W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2016

[Bug 29934] New: fn-parse-json-110 expects wrong result

From: <bugzilla@jessica.w3.org>
Date: Tue, 11 Oct 2016 19:32:58 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29934-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29934

            Bug ID: 29934
           Summary: fn-parse-json-110 expects wrong result
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

<test-case name="fn-parse-json-110"
xmlns="http://www.w3.org/2010/09/qt-fots-catalog">
  <created by="Michael Kay" on="2016-09-29"/>
  <test><![CDATA[parse-json('{"'||codepoints-to-string((10, 37))||'":"x",
"\n%":"y"}', map{'escape':true(), 'duplicates':'reject'})]]></test>
  <result>
    <error code="FOJS0003"/>
  </result>
</test-case>

The input to parse-json is not a valid JSON text.  From RFC7159:

<quote>
All Unicode characters may be placed within the
quotation marks, except for the characters that must be escaped:
quotation mark, reverse solidus, and the control characters (U+0000
through U+001F).
</quote>

Therefore, passing a naked control character should raise FOJS0001.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 11 October 2016 19:33:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:02 UTC