json 2.0 bug: error raised when passing invalid JSON option

Bug #920720 reported by Sorin Marian Nasoi
6
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://www.w3.org/2005/xqt-errors:XPST0003:

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/zorba/json/json-invalid-option-parameter

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

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.

Changed in zorba:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.