JSON Reader task

On this page

Use JSON document reader for structured objects, such as a policy catalogue. Choose it instead of Text when object boundaries and complete properties matter.

UTF-8 JSON files may include an initial byte-order mark (BOM). It counts toward the existing source-byte allowance; other encodings are not supported by JSON reader.

json-document-reader-configuration.png

Field

Required

Default and behavior

Pointer

No

Blank selects the root. A pointer such as /records selects an object or array of objects.

Keys to use

No

Blank/empty retains complete root objects. Nonempty keys select top-level properties for document text, not Page form fields. Do not combine with a nonempty Pointer.

For example, /records selects the records in this source:

{
  "records": [
    {
      "title": "Refund policy",
      "description": "Refunds are available within 30 days."
    }
  ]
}

Leaving both options unset preserves complete objects and canonical JSON text in metadata.swfSourceJson. To read only description text from root objects, leave pointer blank and select key description. Key selection intentionally omits complete-object structure. If none of the requested keys exists, the reader falls back to whole-object text without full-object structural metadata. This is not redaction or an access-control boundary. Correct malformed pointers, wrong source shapes or conflicting selections.

Pointer uses JSON Pointer syntax, not JSONPath. Empty selects the root; /records/0 selects the first object. Use ~1 for / and ~0 for ~ inside a key. Missing or scalar targets and selected arrays containing non-objects fail the task without publishing a partial result. Unselected JSON-compatible scalars and mixed arrays may remain outside that section. Source limits still count the complete input, not only the selection.

Example

Use document reader basics for the required Source expression, captured input, retry and routing. Options belong directly on this task; its JSON type is JsonDocumentReader.

  1. Select JSON Reader Task and open Configuration.
  2. Enter ${source} in Source expression and /records in Pointer.
  3. Leave Keys to use empty for this example.
  4. Map the JSON value into source on Input Parameters first.

example-json-reader-task.png

Input

Captured task data after Input Parameters mapping:

{
  "source": {
    "records": [
      {
        "description": "Refunds are available within 30 days."
      }
    ]
  }
}

Output

The task returns the shared always-file documents.json output, not inline records. Source, result-file and storage limits still apply for zero or one record.

Raw task output:

{
  "swf:file": {
    "id": "3AbCdEfGhIjKlMnOpQrStU",
    "workflowId": "4AbCdEfGhIjKlMnOpQrStU",
    "taskId": "5AbCdEfGhIjKlMnOpQrStU",
    "contentType": "application/json",
    "fileName": "documents.json",
    "sizeInBytes": 254,
    "createdOn": "2026-10-22T00:00:00Z"
  }
}

A following task can map the attachment with ${['Read Json'].output['swf:file']}.