json 2.0 bug: comment nodes should be ignored by json:serialize

Bug #920722 reported by Sorin Marian Nasoi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Paul J. Lucas

Bug Description

Comment nodes should be ignored by json:serialize function: please see failing tests:
- test/rbkt/zorba/json/json-snelson-serialize-object-03
- test/rbkt/zorba/json/json-snelson-serialize-array-12

For instance, test json-snelson-serialize-object-03:

import module namespace json = "http://www.zorba-xquery.com/modules/converters/json";

let $json :=
  <json type="object">
  <!--comment-->
    <pair name="a" type="number">1</pair>
  <!--comment-->
  </json>
return json:serialize( $json )

returns
{,"a":1,}
instead of
{"a":1}

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
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.