JSON Document
Parse a JSON document into JSON objects, or create a JSON document from JSON items.
Use this Node when you want to work with JSON documents as streams between Steps in a Workflow.
Revision History
0.0.0.4 - Initial release.
0.0.0.11 - Current release.
Setup Notes
You can add this Node to a Workflow without authentication or external setup.
Methods
Parse
Reads a JSON document (either a single, root JSON object or an array of JSON objects), and returns each object in the document.
Use AllowTrailingCommas only when the source document is known to include trailing commas.
| Parameter | Type | Description |
|---|---|---|
Document |
Stream | The JSON document to parse. |
Options.PropertyNameCaseInsensitive |
Boolean | Treat property names case-insensitively while parsing. The default is true. |
Options.AllowTrailingCommas |
Boolean | Allow trailing commas in arrays and objects. The default is false. |
Options.MaxDepth |
Integer | Maximum nesting depth to allow while parsing. Use 0 for the framework default. |
| Return | Type | Description |
|---|---|---|
Items |
Array | One JSON object for each parsed item. |
Create
Writes input items into one JSON array document.
This method always writes a JSON array. If you need a single root object, shape the output in a later Step.
| Parameter | Type | Description |
|---|---|---|
Items |
Array | The JSON items to include in the output document. |
| Return | Type | Description |
|---|---|---|
Document |
Stream | The rendered JSON document. |
Usage Notes
- Leading whitespace and a UTF-8 byte order mark are ignored when the document is parsed.
- If the document does not start with
{or[, parsing fails. - For JSON values that are not objects, use a different shaping Step before this Node.
Known Issues
Parseexpects objects. Arrays that contain non-object values are currently not supported.