Skip to content

new feature in CharReaderBuilder: failIfExtra

Pre-release
Pre-release
Compare
Choose a tag to compare
@cdunn2001 cdunn2001 released this 13 Feb 16:31

This setting tells the Reader to fail (return false) if there is extra non-whitespace after a properly parsed JSON value. It catches mistakes like this (missing initial {):

"key" : "value" }

which would otherwise be interpretted as simply

"key"

failIfExtra is available by itself, and is also added for strictMode().