Skip to content

JSON File

Reads and writes data from a JSON file.

Categories: helpers

Type: jsonFile/v1


Actions

Read from File

Name: read

Reads data from a JSON file.

Properties

NameLabelTypeDescriptionRequired
fileTypeFile TypeSTRING
Options JSON, JSONL
The file type to choose.true
fileEntryFileFILE_ENTRYThe object property which contains a reference to the JSON file to read from.true
isArrayIs ArrayBOOLEAN
Options true, false
The object input is array?null
pathPathSTRINGThe path where the array is e.g ‘data’. Leave blank to use the top level object.null
pageSizePage SizeINTEGERThe amount of child elements to return in a page.null
pageNumberPage NumberINTEGERThe page number to get.null

Example JSON Structure

{
"label" : "Read from File",
"name" : "read",
"parameters" : {
"fileType" : "",
"fileEntry" : {
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
},
"isArray" : false,
"path" : "",
"pageSize" : 1,
"pageNumber" : 1
},
"type" : "jsonFile/v1/read"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Write to File

Name: write

Writes the data to a JSON file.

Properties

NameLabelTypeDescriptionRequired
fileTypeFile TypeSTRING
Options JSON, JSONL
The file type to choose.true
typeTypeSTRING
Options OBJECT, ARRAY
The value type.null
sourceSourceOBJECT
Properties {}
The object to write to the file.true
sourceSourceARRAY
Items []
The array to write to the file.true
filenameFilenameSTRINGFilename to set for binary data. By default, “file.json” will be used.true

Example JSON Structure

{
"label" : "Write to File",
"name" : "write",
"parameters" : {
"fileType" : "",
"type" : "",
"source" : [ ],
"filename" : ""
},
"type" : "jsonFile/v1/write"
}

Output

Type: FILE_ENTRY

Properties

NameTypeDescription
extensionSTRING
mimeTypeSTRING
nameSTRING
urlSTRING

Output Example

{
"extension" : "",
"mimeType" : "",
"name" : "",
"url" : ""
}