JSON Parser
- Kalpana Malladi
- Aparna Tayi (Unlicensed)
- Ankur Parekh
On this Page
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: | Works in Ultra Task Pipelines. | |||||||
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 Do not select this property if the input data is not in JSON lines format. If it has no newline character and its data size exceeds available memory, it may cause an out of memory error. 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. Do not select this property if the input data is not in JSON lines format. If it has no newline character and its data size exceeds available memory, it may cause an out of memory error. Example: Selected Default value: Not selected | |||||||
Support Type Extensions | Select this checkbox to enable the Snap to format/parse the Snaplogic-specific syntax indicating objects of the special types, such as byte arrays and date objects in JSON. For more information, see the Input Schema Types example. | |||||||
Snap Execution | Select one of the three modes in which the Snap executes. Available options are:
Default Value: Execute only |
Input as a non UTF-8 compliant
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
JSON Parser with JSON Lines Selected
In 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:
Reading an Input File Other Than the UTF-8 Format
Reading 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:
Reading an Upstream JSON File and Parsing the Data
If 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:
Release | Snap Pack Version | Date | Type | Updates | ||||||
---|---|---|---|---|---|---|---|---|---|---|
August 2024 | 438patches28073 | Latest | Fixed an issue with the JSON Generator and XML Generator Snaps that caused unexpected output displaying '__at__' and '__h__' instead of '@' and '-' respectively because the Snap could not update them to their original values after the Velocity library upgrade. | |||||||
August 2024 | 438patches27959 | Latest | Fixed an issue with the Sort where the Snap could not sort files larger than 52 MB. This fix applies to Join Snap also. | |||||||
August 2024 | main27765 | Stable | Upgraded the org.json.json library from v20090211 to v20240303, which is fully backward compatible. | |||||||
May 2024 | 437patches26643 | Latest |
| |||||||
May 2024 | 437patches26453 | Latest |
| |||||||
May 2024 | main26341 | Stable |
| |||||||
February 2024 | 436patches25564 | Latest | Fixed an issue with the JSON Formatter Snap that generated incorrect schema. | |||||||
February 2024 | 436patches25292 | Latest | Fixed an If the input documents are unsorted and GROUP-BY fields are used, you must use the Sort Snap upstream of the Aggregate Snap to presort the input document stream and set the Sorted stream field Ascending or Descending to prevent the Learn more about presorting unsorted input documents to be processed by the Aggregate Snap. | |||||||
February 2024 | main25112 | Stable | Updated and certified against the current SnapLogic Platform release. | |||||||
November 2023 | 435patches24802 | Latest | Fixed an issue with the Excel Parser Snap that caused a null pointer exception when the input data was an Excel file that did not contain a StylesTable . | |||||||
November 2023 | 435patches24481 | Latest | Fixed an issue with the Aggregate Snap where the Snap was unable to produce the desired number of output documents when the input was unsorted and the GROUP-BY fields field set was used. | |||||||
November 2023 | 435patches24094 | Latest | Fixed a deserialization issue for a unique function in the Aggregate Snap. | |||||||
November 2023 | main23721 | Stable | Updated and certified against the current SnapLogic Platform release. | |||||||
August 2023 | 434patches23076 | Latest | Fixed an issue with the Binary to Document Snap where an empty input document with Ignore Empty Stream selected caused the Snap to stop executing. | |||||||
August 2023 | 434patches23034 | Latest | ||||||||
August 2023 | 434patches22705 | Latest | Fixed an issue with the JSON Splitter Snap that caused the pipeline to terminate with excessive memory usage on the Snaplex node after the 4.33 GA upgrade. The Snap now consumes less memory. | |||||||
August 2023 | main22460 | Stable | Updated and certified against the current SnapLogic Platform release. | |||||||
May 2023 | 433patches22431 | Latest |
| |||||||
May 2023 | 433patches21779 | Latest | The Decrypt Field and Encrypt Field Snaps now support CTR (Counter mode) for the AES (Advanced Encryption Standard) block cipher algorithm. | |||||||
May 2023 | 433patches21586 | Latest | The Decrypt Field Snap now supports the decryption of various encrypted fields on providing a valid decryption key. | |||||||
May 2023 | 433patches21461 | Latest | The following Transform Snaps include new fields to improve memory management: Aggregate, Group By Fields, Group By N, Join, Sort, Unique. | |||||||
May 2023 | 433patches21336 | Latest | Fixed an issue with the AutoPrep Snap where dates could potentially be rendered in a currency format because currency format options were displayed for the DOB column. | |||||||
May 2023 | 433patches21196 | Latest | Enhanced the In-Memory Lookup Snap with the following new fields to improve memory management and help reduce the possibility of out-of-memory failures:
These new fields replace the Maximum memory % field. | |||||||
May 2023 | main21015 | Stable | Upgraded with the latest SnapLogic Platform release. | |||||||
February 2023 | 432patches20535 | Latest | Fixed an issue with the Encrypt Field Snap, where the Snap failed to support an RSA public key to encrypt a message or field. Now the Snap supports the RSA public key to encrypt the message. | |||||||
February 2023 | 432patches20446 | Latest | The Join Snap is enhanced with the following:
| |||||||
February 2023 | 432patches20250 | Latest |
| |||||||
February 2023 | 432patches20151 | Stable/Latest | Fixed an issue that occurred with the JSON Splitter Snap when used in an Ultra pipeline. The request was acknowledged before it was processed by the downstream Snaps, which caused a 400 Bad Request response. | |||||||
February 2023 | 432patches20062 | Stable/Latest | Fixed the behavior of the JSON Splitter Snap for some use cases where its behavior was not backward compatible with the 4.31 GA version. These cases involved certain uses of either the Include scalar parents feature or the Include Paths feature. | |||||||
February 2023 | 432patches19974 | Stable/Latest | Fixed the Review your pipelines where this error occurred to check your assumptions about the input to the JSON Splitter and whether the value referenced by the JSON Path to Split field will always be a list. If the input is provided by an XML-based or SOAP-based Snap like the Workday or NetSuite Snaps, a result set or child collection that’s an array when there's more than one result or child will be an object when there's only one result or child. In these cases, we recommend using a Mapper Snap and the | |||||||
February 2023 | 432patches19918 | Stable/Latest |
| |||||||
February 2023 | main19844 | Stable | Upgraded with the latest SnapLogic Platform release. | |||||||
November 2022 | 431patches19441 | Stable | The Encrypt Field Snap supports decryption of encrypted output in Snowflake Snaps. | |||||||
November 2022 | 431patches19385 | Latest | The Transform Join Snap now doesn’t fail with the | |||||||
November 2022 | 431patches19359 | Latest | The JSON Splitter Snap includes memory improvements and a new Exclude List from Output Documents checkbox. This checkbox enables you to prevent the list that is split from getting included in output documents, and this also improves memory usage. | |||||||
November 2022 | main18944 | Stable |
| |||||||
October 2022 | 430patches18800 | Latest | The Sort and Join Snaps now have improved memory management, allowing used memory to be released when the Snap stops processing. | |||||||
October 2022 | 430patches18610 | Latest | The CSV Formatter and CSV Parser Snaps now support shorter values of Unicode characters. | |||||||
October 2022 | 430patches18454 | Latest |
| |||||||
The CSV Parser Snap now parses data with empty values in the columns when using a multi-character delimiter. | ||||||||||
September 2022 | 430patches18119 | Latest | The Transcoder Snap used in a low-latency feed Ultra Pipeline now acknowledges the requests correctly. | |||||||
September 2022 | 430patches17802 | Latest | The Avro Parser Snap now displays the decimal number correctly in the output view if the column’s logical type is defined as a decimal. | |||||||
September 2022 | 430patches17737 | Stable/Latest | AutoPrep now enables you to handle empty or null values. | |||||||
September 2022 | 430patches17643 | Latest | The CSV Parser and CSV Formatter Snaps now support either \ or \\ for a single backslash delimiter which were failing earlier. | |||||||
September 2022 | 430patches17589 | Latest | The CSV Formatter Snap does not hang when running in specific situations involving multibyte characters in a long field. If you notice the CSV Formatter Snap is hung, we recommend that you update to the 430patches17589 version and restart your Snaplex. | |||||||
August 2022 | main17386 | Stable |
| |||||||
4.29 Patch | 429patches16990 | Latest |
| |||||||
4.29 Patch | 429patches16923 | Latest |
| |||||||
4.29 Patch | 429patches16521 | Latest |
| |||||||
4.29 Patch | 429patches16026 | Latest | Enhanced the Excel Parser Snap with the Custom Locale dropdown list that allows you to select a user-defined locale to format numbers as per the selected locale. | |||||||
4.29 | main15993 | Stable |
| |||||||
4.28 patch | 428patches14370 | Latest | Fixed an issue with the XML Generator Snap, where the Snap failed with an invalid UTF-8 sequence error when running on the Windows Snaplex. | |||||||
4.28 | main14627 | Stable | Upgraded with the latest SnapLogic Platform release. | |||||||
4.27 Patch | 427patches12966 | Latest | Enhanced the Avro Formatter Snap to display meaningful error message while processing invalid and null values from the input. | |||||||
4.27 | main12989 | Stable and Latest | Fixed an issue in the Group by Fields Snap that caused the Snap to abort with an error when executed with zero input documents. | |||||||
4.27 | main12833 | Stable |
| |||||||
4.26 Patch | 426patches12086 | Latest | Fixed an issue with the Join Snap, where it exhausted the memory while buffering millions of objects. | |||||||
4.26 Patch | 426patches11780 | Latest | Fixed an issue in the XML Formatter Snap, where the Map input to first repeating element in XSD checkbox is selected, while no XSD is specified for mapping the input. | |||||||
4.26 Patch | 426patches11725 | Latest | Fixed an issue with the Join Snap where the upstream document flow of the right view is blocked by the left view, which hung the Join Snap. | |||||||
4.26 | main11181 | Stable |
| |||||||
4.25 Patch | 425patches10663 | Latest | Fixed an issue in the CSV Formatter Snap, where even if the Ignore empty stream checkbox is not enabled, the Snap did not produce an empty binary stream output in case there is no input document. | |||||||
4.25 Patch | 425patches10152 | Latest |
| |||||||
4.25 Patch | 425patches9815 | Latest | Fixed a | |||||||
4.25 Patch | 425patches9749 | Latest | Enhanced XML Parser Snap to recognize input headers when defining inbound schema. | |||||||
4.25 Patch | 425patches9638 | - | Latest | Reverts the Join Snap to the 4.24 release behavior. This is in response to an issue encountered in the Join Snap in the 4.25 release version (main9554), which can result in incorrect outputs from all Join Types. 425patches9638 is the default version for both stable and latest Transform Snap Pack versions for orgs that are on the 4.25 release version. No action is required by customers to receive this update and no impact is anticipated. | ||||||
4.25 | main9554 | Stable | Enhanced the Group By N Snap with the following settings:
| |||||||
4.24 Patch | 424patches8938 | Latest |
| |||||||
4.24 | main8556 | Stable | Upgraded with the latest SnapLogic Platform release. | |||||||
4.23 Patch | 423patches7958 | Latest | Fixes an issue in the JSON Splitter Snap by logging an error when the matcher does not find a pattern. | |||||||
4.23 Patch | 423patches7898 | Latest |
| |||||||
4.23 Patch | 423patches7792 | Latest | Fixes an issue in the XML Formatter Snap when it fails to convert input JSON data, with JSON property having a special character as its prefix, to XML format by sorting the elements. | |||||||
4.23 Patch | 423patches7753 | Latest | Fixes an issue with the JSON Splitter Snap's behavior in Ultra Pipelines that prevents processed requests to be acknowledged and removed from the FeedMaster queue, resulting in retries of requests that are already processed successfully. | |||||||
4.23 | main7430 | Stable | Enhances the JSON Formatter Snap to render groups output from upstream (Group by) Snaps with one document per group and a new line per group element. You can now select the Format each document and JSON lines check boxes simultaneously. | |||||||
4.22 Patch | 422patches6395 | Latest | Fixes the JSON Splitter Snap data corruption issue by copying the data in JSON Splitter Snap before sending it to other downstream Snaps. | |||||||
4.22 Patch | 422patches6505 | Latest | Fixes the XML Generator Snap issue reflecting empty tags and extra space by removing the extra space in the XML output. | |||||||
4.22 | main6403 | Latest | Upgraded with the latest SnapLogic Platform release. | |||||||
4.21 Patch | 421patches5901 | Latest | Enhances the JSON Generator Snap to include pass-through functionality where the Snap embeds the upstream input document under the | |||||||
4.21 Patch | 421patches5848 | Latest |
| |||||||
4.21 | snapsmrc542 | - | Stable | Adds support in the Mapper Snap to display schemas with complex nesting. For example, if Snaps downstream from the | ||||||
4.20 Patch | transform8792 | - | Latest | Resolves the | ||||||
4.20 Patch | transform8788 | - | Latest | Resolves the NullPointerException in the Join Snap on Windows Snaplex instances. | ||||||
4.20 Patch | transform8760 | - | Latest |
The JSON Formatter Snap output now includes only those fields from the input file that are specified in the Content field under Settings. If your Pipelines use the JSON Formatter Snap with the JSON lines field selected, they may fail to execute correctly if the Content field mentions a specific object or field but the downstream Snap is expecting the entire data. Hence, for backward compatibility, you must review the entries in the Content field based on the desired output, as follows:
The behavior of the Snap when the JSON lines field is not selected is correct and remains unchanged. The Example: Filtering Output Data Using the JSON Formatter Snap's Content Setting further illustrates the corrected vs the old behavior.
XML Generator Snap behavior might break existing Pipelines The XML Generator Snap now gives precedence to any custom XML data that is provided over data coming from upstream Snaps, to generate the output. Existing Pipelines using the XML Generator Snap may fail in the following scenarios. Use the resolution provided to update the Snap settings based on the XML data you want to pass to downstream Snaps.
| ||||||
4.20 Patch | transform8738 | - | Latest |
| ||||||
4.20 | snapsmrc535 | - | Stable | Upgraded with the latest SnapLogic Platform release. | ||||||
4.19 Patch | transform8280 | - | Latest | Fixed an issue with the Excel Parser Snap wherein the Snap incorrectly outputs Unformatted General Number format. | ||||||
4.19 | snaprsmrc52 |