Closed simonmikkelsen closed 4 years ago
After researching a work around I found out that this is a feature of most json parsers. To get strict validation of json I ended up parsing the json structure using the example at http://tutorials.jenkov.com/java-json/jackson-jsonparser.html and simply disgarding any output. It will give an exception if there is trailing garbage.
I create a schema with the following content:
{}a
As this is invalid json I would expect to get an error when trying to validate it but it parses. I use the 2.1.0 release and runs it like this:When putting the random text in front of the schema, i.e.
a{}
I get the expected json parsing error.