Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 506 Bytes

json-doc.md

File metadata and controls

34 lines (26 loc) · 506 Bytes

json-doc()

node-set json-doc(string path)

converts the JSON document at the given path into OXN, parses it and returns the <json> root element.

Relative paths are resolved relative to the flow file's path.

user.json:

{
  "name": "brenda"
}
json-doc("user.json")/name

Example: Read a JSON config

Flow:

<flow>
  <echo if="json-doc('fit://site/conf.json')/maintenance" status="503">
    Under maintenance
  </echo>
</flow>