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 29267 - serialize-json-124 assumes serialized map entries are ordered
Summary: serialize-json-124 assumes serialized map entries are ordered
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Proposed Edited Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 17:57 UTC by Josh Spiegel
Modified: 2015-11-09 11:01 UTC (History)
1 user (show)

See Also:


Attachments

Description Josh Spiegel 2015-11-06 17:57:52 UTC
<test-case name="serialize-json-124" covers="fn-serialize json-output">
        <description>sparse array</description>
        <created by="Debbie Lockett, Saxonica" on="2015-08-20"/>
        <dependency type="spec" value="XP31+ XQ31+"/>
        <test>let $r := serialize(map{1:"a",2:"b",4:"d",10:"j",7:"g"}, map{'method':'json'}) return
            translate($r,' &#x9;&#xa;&#xd;', '')</test>
        <result>
            <assert-string-value>{"1":"a","2":"b","4":"d","7":"g","10":"j"}</assert-string-value>
        </result>
    </test-case>


This test incorrectly assumes that map entries are serialized in a particular order.
Comment 1 Debbie Lockett 2015-11-09 11:00:31 UTC
Quite right. I've adapted the result assertions so that the order of entries in the serialized output is not important. For completeness, serialize-json-113 has been similarly edited.