Please note:this document is a work in progress.

JSON Kit

This kit contains the following nodes:

schemish

Converts a given JSON schema to Schemish

validateJson

Validates given JSON against a given JSON Schema.

jsonata

Use this node to execute JSONata expressions. JSONata is a versatile JSON query language.

Example

If we send the following inputs to jsonata:

{
  "expression": "$join(items.snippet, '\n')",
  "json": {
    "items": [
      {
        "snippet": "Question: How old is planet Earth?"
      },
      {
        "snippet": "Thought: I wonder how old planet Earth is?"
      }
    ]
  }
}

We will get this output:

{
  "result": "Question: How old is planet Earth?\nThought: I wonder how old planet Earth is?"
}

Inputs

Outputs:

Implementation:

The xmlToJson node

Use this node to convert XML to JSON. Most nodes in the starter kit are designed to work with JSON, so this node is useful when you have XML data.

This nodes takes one required xml property, which it treats as XML and converts to it to JSON as the json output property. The format of JSON follows the alt-json convention that is described in https://developers.google.com/gdata/docs/json.

Example

If we send the following inputs to xml-to-json:

{
  "xml": "<root><question>How old is planet Earth?</question><thought>I wonder how old planet Earth is?</thought></root>"
}

We will get this output:

{
  "json": {
    "root": {
      "question": { "$t": "How old is planet Earth?" },
      "thought": { "$t": "I wonder how old planet Earth is?" }
    }
  }
}

Inputs:

Outputs:

Implementation: