xs:string
. Errors such as jerr:JNTY0004
or err:XPTY0004
may be raised upon failure of one of these steps.
js:null
). However, if the colon is preceded with a question mark, the pair is omitted instead.
jerr:JNDY0003
is raised if two pairs have the same name (the comparison is made using fn:codepoint-equal
).
{ "id" : 404, "name" : "Stanco Grease Pot", "price" : 6.49, "weight" : 3.8, "uses" : ["Grease storage","Backpacking pot"] }
{ "Sunday" : 1, "Monday" : 1 + 1, "Tuesday" : 3 * 1, "Wednesday" : 8 div 2, "Thursday" : 5, "Friday" : count(for $i in 1 to 6 return $i), "Saturday" : 10 - 3, "NotADay" ?: () }
{ "Sunday" : 1, "Monday" : 2, "Tuesday" : 3, "Wednesday" : 4, "Thursday" : 5, "Friday" : 6, "Saturday" : 7 }
jerr:JNDY0003
is raised if two pairs with the same name are encountered.
let $object1 := { "Captain" : "Kirk" } let $object2 := { "First officer" : "Spock" } return {| $object1, $object2 |}
{ "Captain" : "Kirk", "First officer" : "Spock" }
{| for $d at $i in ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ) return { $d : $i } |}
{ "Sunday" : 1, "Monday" : 2, "Tuesday" : 3, "Wednesday" : 4, "Thursday" : 5, "Friday" : 6, "Saturday" : 7 }