Skip to main content

JSON Output

Description

JSON Output generates JSON from incoming row data and writes it to a file or stores it in an output field. Use this step when your workflow needs to produce JSON for API consumption, data exchange, or file-based integration — for example, creating JSON payloads for a REST API, exporting data in JSON format for a web application, or building JSON configuration files. The output can be formatted as a JavaScript array or a JavaScript object depending on the step settings.

Configurations

Field NameDescription
OperationSpecify type of step operation, output json structure, step output file. This file will be used to dump all generated json.
Settings:
Step nameStep name should be unique in context of workflow.
OperationSpecify step operation type. Currently available 3 types of operation:

Output value - only pass output json as a step output field, do not dump to output file.

Write to file - only write to fie, do not pass to output field Output value and write to file - dump to file and pass generated json as a step output file.

Json block nameThis value will be used as a name for json block. Can be empty string that will affect output json structure, see detailed description below.
Nr. rows in a blockSpecify the number of rows in a block. In others words it is the number key - value pairs in a json block. 0 means all the rows in the same unique block.

NOTE, 1 is a special value, in case of 1 every output will be generated as one object. See description below.

Output valueThis value will be used as a step output field. Will contain generated json output block depending on step settings.
Compatibility modeThis check box handles compatibility configuration with previous Process Studio versions.
Output File:
FilenameFull path to output file.
AppendIf not checked new file will be created every time step is running. If file with specified name already existed - it will be replaced by a new one. If checked - new json output will be appended at the end of existing file. Or if existing file is not exists - it will be created as in previous case.
Create Parent folderUsually, file name contains some path folder as a parent folder. If parent folder does not exist and this option is checked - parent folder will be created as a new folder. Otherwise - file not be found and step will fail.
Do not open create at startIf not checked - file (and in some cases parent folder) will be created/opened to write during workflow initialization. If checked - file and parent folder will be created only after step will get any first input data.
ExtensionOutput files extension. Default value is 'js'.
EncodingOutput file encoding.
Pass output to servletEnable this option to return the data via a web service instead writing into a file.
Include date in filename?If checked - output file name will contain File name value + current date. This may help to generate unique output files.
Include time in filenameIf checked - output file name will contain file creation time. Same as for 'Include date in filename' option.
Show filename(s) buttonCan be useful to test full output file path.
Add file to result filenames?If checked - created output file path will be accessible form step result.
Files Tab:
FieldnameInput step field name. Use 'Get Fields' button to discover available input fields
Element nameJson element name as a key. For example "A":"B" - A is an element name, B is actual input value mapped for this Element name.