On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Snap type: | Parse | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap reads JSON binary data from its input view and parses and writes it as JSON document data to its output view. | ||||||||||||||
Prerequisites: | [None] | ||||||||||||||
Support and limitations: | |||||||||||||||
Account: | Accounts are not used with this Snap. | ||||||||||||||
Views: |
| ||||||||||||||
Settings | |||||||||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||||||||||||||
Filter path | The Filter path property specifies the JSON path to the filter to be applied when parsing the given JSON data. The Snap extracts the parts of data that applies to the filter condition. For more information regarding JSON path, refer to the site http://goessner.net/articles/JsonPath/ | ||||||||||||||
Non-standard JSON | Required. The Non-standard JSON property specifies whether or not the Component should allow non-standard features in the given JSON data. | ||||||||||||||
Process array | Required. The Process array property specifies whether or not the Component should take a root JSON array and writes each element of the array as a JSON document. Example: Selected
Default value: Selected | ||||||||||||||
JSON lines | This property specifies the Snap's error handling when the input JSON data is newline-delimited JSON (JSON lines) and contains invalid JSON data: If selected, the Snap writes an error and continues to parse the next JSON lines. The documents in a line after the invalid data are not parsed if the line contains more than one document. Lower performance is expected since the data is parsed one line at a time.
Example: Selected Default value: Not selected | ||||||||||||||
Multiexcerpt include macro | | name | Support _ Type _ Extensionspage | JSON Formatter
| multiexcerpt-include-macro|||||||||||
name | |||||||||||||||
page | Anaplan Read | Multiexcerpt include macro | | ||||||||||||
name | Snap_Execution_Introduced | page | Anaplan Read
Info | ||
---|---|---|
| ||
JSON Parser Snap supports reading the input file in UTF-8 format only. However, when the input data from the upstream is a non UTF-8 format (such as ISO-8859-13, IBM01144, windows-1258 and so on), use the Transcoder Snap to decode the format back to the UTF-8 compliant and then parse the data. |
Examples
Expand | ||
---|---|---|
| ||
JSON Parser with JSON Lines SelectedIn the following pipeline, the JSON Parser Snap parses the valid lines from the upstream File Reader Snap and routes the invalid lines to the error view. The File Reader passes four lines of which one line carries an invalid data with a missing delimiter: The JSON Parser Snap parses the data from the upstream. Note the output preview displays the valid three lines only: The invalid line is routed to the error view: |
Expand | ||
---|---|---|
| ||
Reading an Input File Other Than the UTF-8 FormatReading an input file other than the UTF-8 format: The following pipeline reads the input file in ISO-8859-15 format to generate an output file in UTF-8 format. The Transcoder Snap converts the incoming ISO-8859-15 format document into the UTF-8 compliant format. The JSON Parser Snap parses the transcoded upstream document and displays the below output preview: |
Expand | ||
---|---|---|
| ||
Reading an Upstream JSON File and Parsing the DataIf you have a JSON file that looks like this: When it is read by a File Reader Snap, the output looks like this: If you add a JSON Parser Snap after the File Read, the output then looks like this: |
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|