Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/JSON/XQuery/json.xquery
Normal file
28
Task/JSON/XQuery/json.xquery
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
let $json := '
|
||||
{
|
||||
"Astring" : "string-value",
|
||||
"Anumber" : 5.7,
|
||||
"Anull" : null,
|
||||
"Aarray" : ["One","Two", 3],
|
||||
"Aobject" : {
|
||||
"key1": "value1",
|
||||
"key2": "value2"
|
||||
},
|
||||
"Atrue" : true,
|
||||
"Afalse" : false
|
||||
}
|
||||
'
|
||||
let $xml := json-to-xml($local:json)
|
||||
return (
|
||||
"XPath fn:json-to-xml#1 function:"
|
||||
,""
|
||||
,$xml
|
||||
,""
|
||||
,"Round trip, using fn:xml-to-json#1:"
|
||||
,""
|
||||
,xml-to-json($xml)
|
||||
,""
|
||||
,"Using BaseX json:parse#2 function to create an XPath 3.1 map:"
|
||||
,""
|
||||
,json:parse($local:json, map{"format":"xquery"})
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue