JSON Input
Description:
JSON input is a step in the Input Plugin for Process Studio Workflows. The JSON Input step plugin step can read relevant portions out of JSON structures dynamically from field values in the stream or parameters, referring to files or Urls.
Secondly, users can also define files and urls as static values. The step outputs portions out of JSON structures as rows.
Known Limitation
When a JSON Input step is used as the first step in a workflow and a file is specified for reading JSON content, clicking Preview rows button may result in a Null Pointer Exception related to the input field, and the JSON file is not previewed as expected.
Configurations:
| Field Name | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| File Tab: | Here you enter basic connection information for accessing a resource. | ||||||||
| Step name | Specify a unique name for the step. This label identifies the step within the workflow and helps you reference it when debugging or linking steps. | ||||||||
| Source is from a previous step | Enable checkbox to retrieve the source from a previously defined field. | ||||||||
| Select field | Choose the field containing the source file from a dropdown list. | ||||||||
| Use field as file names | Enable checkbox if source is a filename. | ||||||||
| Read source as URL | Enable checkbox if source should be accessed as a URL | ||||||||
| Do not pass field downstream | Enabling checkbox will not pass this field downstream. This improves performance and memory utilization with large JSON fields. | ||||||||
| File or directory | Specify the location of the source if the source is not defined in a field | ||||||||
| Regular expression | Specify a regular expression. All filenames that match this regular expression are selected if a directory is specified | ||||||||
| Exclude regular expression | Specify a regular expression. All filenames that match this regular expression are excluded if a directory is specified | ||||||||
| Button: Show filename | Click Button to display the file names selected. | ||||||||
| Content Tab: | enables you to configure which data to collect. | ||||||||
| Ignore empty file | Enable checkbox to skip empty files---when unchecked, instances of empty files causes the process to fail and stop | ||||||||
| Do not raise an error if no files | Enable checkbox to avoid failure when there is no file to process. When unchecked the workflow to fails when there is no file to process. | ||||||||
| Ignore missing path | When unchecked, causes the workflow to fail when the JSON path is missing---then checked, avoids failure when there is no JSON path | ||||||||
| Limit | Sets a limit on the number of records generated from the step when set greater than zero | ||||||||
| Include filename in output | Adds a string field with the filename in the result | ||||||||
| Rownum in output | Adds an integer field with the row number in the result | ||||||||
| Add files to result files name | If checked, adds processed files to the result file list | ||||||||
| Fields Tab: | |||||||||
| JSON Editor | Specify the required JSON into the editor. Click Generate JSON Tree to parse the JSON and display in the Select Field Window, where you can select fields from complex JSON data and add them to the Field table. | ||||||||
| Generate JSON Tree | Click Generate JSON Tree to view the visual tree structure of complex JSON data. You can expand, collapse, search, and select fields. Notes: - The system does not save the provided JSON after you close this dialog. - Clear the editor before adding new JSON data. | ||||||||
| Select Field Window | The window shows the tree structure of given JSON data. Select required fields from the structure and click Select to add fields in Field table to procced The total number of selected fields appears at the bottom of the page as Selected Count: N. For example, Selected Count: 32 The window provides the following options: - Search - Select All - Deselect All - Expand All - Collapse All - Select Field Selection Status Colors: 1. Standard: Indicates an unselected field, for example- location 2. New Selection: Indicates newly selected fields in purple, for example, id 3. Already Mapped: Indicates previously selected fields in green, for example, store 4. Search Match : Indicates fields that match the search in blue, for example, book Example JSON (used in the tree): {"store": {"id": 101, "location": "New York", "inventory": [{"book" : "Dune", "author": "Herbert" }]}} | ||||||||
| Beautify JSON | Click Beautify JSON to format JSON with indentation for better readability. | ||||||||
| Minify JSON | Click Minify JSON to compresses JSON into a single compact line. | ||||||||
| Clear JSON | Click Clear JSON to clear all JSON text from the editor. | ||||||||
| Field table: | Table shows the list of selected fields and their details, such as field name, path, type, and other related information. Or Specify the JSON field details to the table in following formats: - Sanitized field name (for example, store_inventory_0_book) OR - Full JSONPath (for example, $.store.inventory[0].book) | ||||||||
| Name | Specify a custom name for the output field. This is the name you see in the next steps of your process. | ||||||||
| Path | Specify the specific part of the JSON data (the attribute) to read and extract. For example: If your JSON data looks like {"customer": {"age": 30}}, enter $.customer.age to extract the number 30 | ||||||||
| Type | Specify the data type for the field to ensure the step processes the data correctly. For example, Specify String for text (like "John Doe"), Integer for whole numbers (like 25), or Date for calendar dates. Available data types: - Number - String - Date - Boolean - Integer - BigNumber - Binary - Timestamp - Internet Address | ||||||||
| Format | Specify or select a format to define how the data appears. This is primarily useful for reading dates or specific number patterns. For example, For a JSON date like "2026-12-31", select yyyy-MM-dd in the format field. | ||||||||
| Length | Specify the maximum number of characters or digits the field holds. For example, Specify 50 for a text field to ensure it reads up to 50 characters. For a number like "12345", specify 5 | ||||||||
| Precision | Specify the number of digits to retain after the decimal point. This applies only to numeric data types. For example: For prices like "19.99", specify 2 to keep two digits after the decimal. | ||||||||
| Currency | Specify the currency symbol to use during data type conversion. For example, For the value "$100", specify $ as the currency symbol. | ||||||||
| Decimal | Specify the symbol the data uses to separate whole numbers from fractions. For example, For numbers like "10.50" in the US, specify a period (.) For numbers like "10,50" in some European countries, specify a comma (,). | ||||||||
| Group | Specify the symbol the data uses to separate thousands in large numbers. For example, Specify a comma (,) to correctly read numbers formatted like "1,000,000". | ||||||||
| Trim Type | Select a trimming method to remove unwanted whitespace from the data: - None - Left - Right - Both | ||||||||
| Repeat | Specify Y (Yes) to copy the value from the previous row if the current row is blank (null). Specify N (No) to leave the field blank. For Example: If Apple appears once and the next rows are blank, if Repeat is set to Y, the step will repeat Apple for blank rows.
| ||||||||
| Secret | Select Y to mark the field as a secret. The step masks the value (displays ********) in subsequent steps, previews, and logs. To protect the data, the step excludes the field by default when writing to an output file or database. Select N to keep the field value visible as plain text. The step displays the actual value in previews and logs and writes it to the output file or database. Note: If a secret field is combined with plain text in an earlier step (for example, using a Calculator step to create "Token: " + secretField), the result is treated as a new field and is not protected automatically. Mark the new field as Secret to protect its value. | ||||||||
| Additional output fields Tab: | |||||||||
| Short filename field | Specify the field name for short filename. | ||||||||
| Extension field | Specify the field name for filename extension. | ||||||||
| Path field | Specify the field name for file path | ||||||||
| Size field | Specify the size of the file. | ||||||||
| Is hidden field | Specify from Y/N. Y to hide field. Default is N | ||||||||
| Last modification field | Specify the field name for the last modification. | ||||||||
| Uri field | Specify the fieldname for Uri (e.g. file:///C:/temp/file.txt) | ||||||||
| Root uri field | Specify the fieldname for Root Uri (e.g. file:///C:/) |