Also, a similar error occurs if a json error is serialized. In this
case, the closing ']' is missing.

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  json:serialize returns invalid json

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  The json:serialize function returns syntactically incorrect json.

  For example, the existing test query serialize_json_18.xq fails
  because it's missing an ending curly '}' as follows:

  import module namespace json = 
  import schema namespace 

  declare variable $tmp := <json type="object"><pair name="phoneNumbers" 
type="array"><item type="string">212 732-1234</item><item type="string">646 
123-4567</item></pair><pair name="firstName" type="string">John</pair><pair 
name="lastName" type="string">Smith</pair><pair name="address" 
type="object"><pair name="postalCode" type="number">10021</pair><pair 
name="city" type="string">New York</pair><pair name="streetAddress" 
type="string">21 2nd Street</pair><pair name="state" 

  Actual:   <<root>{"phoneNumbers": ["212 732-1234", "646 123-4567"],
  "firstName": "John", "lastName": "Smith", "address": {"postalCode":
  10021, "city": "New York", "streetAddress": "21 2nd Street", "state":

  Expected: <<root>{"phoneNumbers": ["212 732-1234", "646 123-4567"],
  "firstName": "John", "lastName": "Smith", "address": {"postalCode":
  10021, "city": "New York", "streetAddress": "21 2nd Street", "state":

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to