You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
}
But with the JsonGenerator there is no way to create such a sequence. The only way to create a sequence is by putting the objects in an array. But this is different from the Parser.
The text was updated successfully, but these errors were encountered:
The JsonParser documentation shows:
But with the JsonGenerator there is no way to create such a sequence. The only way to create a sequence is by putting the objects in an array. But this is different from the Parser.
The text was updated successfully, but these errors were encountered: