Bugfix in JSONParser
This commit is contained in:
parent
2130877265
commit
7cf36636e7
1 changed files with 3 additions and 1 deletions
|
|
@ -110,8 +110,10 @@ public class JSONParser extends Parser {
|
||||||
root = new DataNode(DataType.Map);
|
root = new DataNode(DataType.Map);
|
||||||
while(end.i == CONTINUE) {
|
while(end.i == CONTINUE) {
|
||||||
key = parse(in, end);
|
key = parse(in, end);
|
||||||
|
if(end.i == END_WITH_NULL) // Break if there is no more data
|
||||||
|
break;
|
||||||
node = parse(in, end);
|
node = parse(in, end);
|
||||||
if(end.i != END_WITH_NULL)
|
if(end.i != END_WITH_NULL) // Only add the entry if it is a value
|
||||||
root.set( key.toString(), node );
|
root.set( key.toString(), node );
|
||||||
}
|
}
|
||||||
end.i = CONTINUE;
|
end.i = CONTINUE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue