Comment 1 for bug 866757

Revision history for this message
Dennis Knochenwefel (dennis-knochenwefel) wrote :

I think, that the parse part is even correct (the strange entities come from the xml serialization). But it's still a problem because this query returns false:

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

declare variable $local:json :=
   '{ "special-chars": {
         "unicode": "\u007B",
         "quote": "\"",
         "backslash": "\\",
         "backspace": "\b",
         "formfeed": "\f",
         "newline": "\n",
         "carriage return": "\r",
         "horizontal tab": "\t",
         "solidus": "\/"
      }
    }';

json:serialize(json:parse($local:json)) eq $local:json