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
According to the JSON grammar, there needs to be at least one thing, be it an object, value, or array. Shouldn't a parsing exception (EOF) be thrown for these? hasNext(), in addition to next(), throws a JsonParsingException when it advances to the next event, and since the parser encounters an EOF before the next event, it's technically invalid JSON.
jsonp-test-suite/src/main/java/org/leadpony/jsonp/testsuite/tests/AbstractJsonParserTest.java
Lines 118 to 119 in 5efa996
According to the JSON grammar, there needs to be at least one thing, be it an object, value, or array. Shouldn't a parsing exception (EOF) be thrown for these?
hasNext()
, in addition tonext()
, throws aJsonParsingException
when it advances to the next event, and since the parser encounters an EOF before the next event, it's technically invalid JSON.Ref: https://tools.ietf.org/html/rfc8259#section-2
The text was updated successfully, but these errors were encountered: