json 2.0 bug: error raised when passing invalid JSON option
Bug #920720 reported by
Sorin Marian Nasoi
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Invalid
|
Medium
|
Paul J. Lucas |
Bug Description
When trying to parsing a valid JSON string with invalid JSON option parameter the error raised is:
http://
In order to raise a more useful error message saying that the options are not set correctly.
Please note that setting the wrong options will happen very often due to the changing of the way the options were set in JSON 1.0 and JSON 2.0.
For instance adding try{} catch {} inside the validation of the options will do the trick.
Please see added failing test
test/rbkt/
To post a comment you must log in.
Your test in illegal XQuery: you need a "return" before the json:parse(). Once the "return" is added, the test fails with an invalid schema validation error which is correct.
This test wrong and this bug is bogus and should be closed.