This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27930 - [fo31] Missing error condition for parse-json
Summary: [fo31] Missing error condition for parse-json
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2015-01-30 10:19 UTC by Michael Kay
Modified: 2015-03-11 21:27 UTC (History)
1 user (show)

See Also:


Description Michael Kay 2015-01-30 10:19:01 UTC
The spec of parse-json does not define an error code to raise if an option is present with an incorrect value, e.g. 'liberal':'maybe'. I propose to use FOJS0004.

The error code FOJS0002 appears in the appendix but is not used (the condition it describes is no longer an error).

The table of options is a little inconsistent in its presentation. For some options it uses a bold "must" to say what the value must be; for some options it is explicit about the default. I propose to use "must", and describe the default, for all three options.
Comment 1 Christian Gruen 2015-01-31 18:45:41 UTC
> I propose to use FOJS0004.

I would suggest to use a general code for invalid map arguments. In EXPath (and many of our own modules), we decided to raise the existing code FORG0006 whenever the type of an argument, or the key or value of a map argument, is invalid. FORG0006 is also raised by fn:boolean, fn:sum, and some other functions.
Comment 2 Michael Kay 2015-02-03 16:20:25 UTC
The WG agreed to fix the bug as suggested.
Comment 3 Michael Kay 2015-02-10 17:20:57 UTC
The change has been applied.
Comment 4 Michael Kay 2015-03-11 21:27:59 UTC
In my efforts to converge the specifications of the various JSON-related functions, this code changed to FOJS0005.