IMHO, line 278 in JsonStreamingParser.cpp is incorrect.
277 void JsonStreamingParser::endObject() {
278 int popped = stack[stackPos];
279 stackPos--;
The line should read:
278 int popped = stack[stackPos-1];
The current type is located one position below 'stackPos', a fact that is also accounted for in all other "JsonStreamingParser::endOfAnything" methods.
The problem occurs when objects and arrays are nested within each other:
{... , "array_a": [
{ ... , "array_b": [1,2,3] },<- Error (expected end of object, but read the end of the previous array instead)
{ ... , "array_c": [1,2,3] },... ]}
With the corrected line, everything is parsed correctly.
IMHO, line 278 in JsonStreamingParser.cpp is incorrect.
277 void JsonStreamingParser::endObject() { 278 int popped = stack[stackPos]; 279 stackPos--;The line should read:
The current type is located one position below 'stackPos', a fact that is also accounted for in all other "JsonStreamingParser::endOfAnything" methods.
The problem occurs when objects and arrays are nested within each other:
{... , "array_a": [ { ... , "array_b": [1,2,3] },<- Error (expected end of object, but read the end of the previous array instead) { ... , "array_c": [1,2,3] },... ]}With the corrected line, everything is parsed correctly.