{"record":{"id":"ba8ab04506672d25","repo":"OrchardCMS/OrchardCore","slug":"cannot-parse-array","errorCode":null,"errorMessage":"Cannot parse array.","messagePattern":"Cannot parse array\\.","errorType":"exception","errorClass":"JsonException","httpStatus":null,"severity":"error","filePath":"src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DynamicJsonConverter.cs","lineNumber":64,"sourceCode":"                }\n\n                throw new JsonException(\"Cannot parse number\");\n\n            case JsonTokenType.StartArray:\n                var list = new List<object?>();\n                while (reader.Read())\n                {\n                    switch (reader.TokenType)\n                    {\n                        default:\n                            list.Add(Read(ref reader, typeof(object), options));\n                            break;\n                        case JsonTokenType.EndArray:\n                            return list;\n                    }\n                }\n\n                throw new JsonException(\"Cannot parse array.\");\n\n            case JsonTokenType.StartObject:\n                var dictionary = new Dictionary<string, object?>();\n                while (reader.Read())\n                {\n                    switch (reader.TokenType)\n                    {\n                        case JsonTokenType.EndObject:\n                            return dictionary;\n\n                        case JsonTokenType.PropertyName:\n                            var key = reader.GetString();\n                            reader.Read();\n                            if (key is not null)\n                            {\n                                dictionary[key] = Read(ref reader, typeof(object), options);\n                            }\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DynamicJsonConverter.cs#L46-L82","documentation":"The reader entered a JSON array but hit end-of-input before JsonTokenType.EndArray was seen (the while (reader.Read()) loop terminated without returning the list). Like the number case, this indicates truncated or malformed JSON rather than merely unusual content.","triggerScenarios":"Thrown at src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DynamicJsonConverter.cs:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the JSON payload for truncation and unbalanced brackets","Ensure any code that pre-processes or streams the JSON preserves array structure","Re-serialize from the original source rather than hand-editing JSON strings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}