Testing the new ACCEPT_INCOMPLETE parse mode and found an issue when the JSON string ends with an open bracket { or a comma ,
JSONParser p = new JSONParser( JSONParser.MODE_PERMISSIVE | JSONParser.ACCEPT_INCOMPLETE );
System.out.println( JSONObject.toJSONString( (JSONObject) p.parse("{") ) );
System.out.println( JSONObject.toJSONString( (JSONObject) p.parse("{\"test\":\"test\",") ) );
create an item child with empty key and null value:
{"":null}
{"test":"test","":null}
instead of:
{}
{"test":"test"}
Testing the new ACCEPT_INCOMPLETE parse mode and found an issue when the JSON string ends with an open bracket { or a comma ,
create an item child with empty key and null value:
instead of: