This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
module namespace plugin = "http://marklogic.com/data-hub/plugins"; | |
import module namespace es = "http://marklogic.com/entity-services" | |
at "/Marklogic/entity-services/entity-services.xqy"; | |
declare option xdmp:mapping "false"; | |
(:~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<export><workspace name="json-tree-walker"><query name="INSERT-DOCS" focus="false" listorder="1" taborder="1" active="true" database="12188229314415601684" server="3177585694450821129" database-name="Documents" server-name="App-Services" mode="xquery">(: Insert our Test Documents :) | |
(: a document with an object node at the root :) | |
xdmp:document-insert('/test.json', xdmp:unquote('{ | |
"string": "a string value", | |
"boolean-false": false, | |
"boolean-true": true, | |
"number-negative": -123, | |
"number-positive": 123, | |
"null": null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (fn:contains(xdmp:get-request-header("Accept-Encoding", ""), "gzip")) then | |
(: do your gzipping here :) | |
else | |
(: don't gzip :) |