jsonp-api icon indicating copy to clipboard operation
jsonp-api copied to clipboard

Parsing a sequence of JSON values that are not enclosed in a JSON array

Open bergtwvd opened this issue 4 years ago • 0 comments

Parsing a sequence of JSON objects is not possible, but the standard says:

 JsonParser can be used to parse sequence of JSON values that are not enclosed in a JSON array, e.g. { } { }. The following code demonstrates how to parse such sequence.


 JsonParser parser = Json.createParser(...);
 while (parser.hasNext) {
     parser.next(); // advance parser state
     JsonValue value = parser.getValue();
 }

See also: https://github.com/leadpony/joy/issues/14

bergtwvd avatar Sep 29 '21 21:09 bergtwvd