In this article
...
You can use this Snap to generate a JSON document for the next Snap in the Pipeline.
- This Snap is often used at the beginning of a Pipeline to create a file.
- This Snap does not need any Accounts.
Prerequisites
...
Limitations and Known Issues
The maximum size for a JSON file generated using this Snap is 16 MB.
Snap Input and Output
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| This Snap can have an upstream Snap that can pass a JSON document in output view. |
Output | Document |
|
| This Snap generates a document that contains the expected result along with the original JSON document (when Pass through is enabled). |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| N/A | JSON Generator | ||||||||
Edit JSON | Apache Velocity template | Optional. Launches the JSON editor which allows you to define JSON. The editor loads an existing JSON document if defined previously. The editor lets you save JSON in SnapLogic's file system or import existing JSON documents from it. You can substitute the variables in the JSON with document values from the input view of the Snap.
You can customize the JSON file to:
Learn more: | Empty JSON file | File with JSON content | ||||||||
Process Array | Checkbox | Optional. The Process array property specifies whether or not the Component should take a root JSON array and write each element of the array as a JSON document. | Selected | Selected | ||||||||
Pass through | Checkbox | Optional. Use this property to pass the data in the input document through to the output document and merge it under the key 'original'. See example for more details. | Deselected | Selected | ||||||||
Support Type Extensions | Checkbox |
| Deselected | Selected | ||||||||
Snap Execution | String | Indicates how the Snap must be executed. Available options are:
| Validate & Execute | Execute only |
...
The input schema in Mapper Snap when you deselect Support Type Extensions checkbox in the JSON Generator Snap is as follows. The Snap displays the SnapLogic-specific syntax in the Input Schema.
Here's the same Mapper Snap when you select the Support Type Extensions checkbox. Note the data types in the Input Schema—the Snap does not display the SnapLogic-specific syntax in the Input Schema.
Similarly, here's a Mapper Snap showing the JSON Parser output when you deselect the Support Type Extensions checkbox.
Here's the same Mapper when you select the Support Type Extensions checkbox.
The Support Type Extensions state affects the JSON Formatter's output. When you deselect this checkbox, the SnapLogic-specific syntax is not used; the Snap uses a string representation for each of the special objects.
Here's the output when you select the Support Type Extensions checkbox:
Downloads
Note | ||
---|---|---|
| ||
|
...