I don’t know anything about the MarkLogic implementation, but some of the key differences between XQuery 3.1 and the JSONiq proposal are: At the data model level: * Maps can use any atomic value as the key, it does not have to be a string * The members of an array are sequences, not necessarily items * JSON’s null is represented as an empty sequence, not as a new atomic data type At the syntax level: * In XQ3.1, Map constructors use the syntax map{ a:b, c:d } rather than bare curlies * XQ 3.1 introduces a lookup operator for maps and arrays: employee?name, or book?author?1 There are many differences of detail, for example XQ3.1 allows an array to be atomized, so that sum() over an array does "the right thing”. Of course these differences were all very hotly debated over a long period of time, and I wouldn’t even attempt to summarize the arguments.
|