Serialization JsonToIon

Serialization JsonToIon

Certified

Convert a JSON file to the Amazon ION format

Converts a JSON file to Amazon ION, Kestra's internal binary format used for passing data between tasks.

Two input formats are supported: one JSON object per line (JSONL), or a JSON array. Examples of each:

{"id": 1, "name": "Widget A", "category": "Electronics"}
{"id": 2, "name": "Widget B", "category": "Household"}
{"id": 3, "name": "Widget C", "category": "Furniture"}
[
  {"id": 1, "name": "Widget A", "category": "Electronics"},
  {"id": 2, "name": "Widget B", "category": "Household"},
  {"id": 3, "name": "Widget C", "category": "Furniture"}
]
yaml
type: io.kestra.plugin.serdes.json.JsonToIon

Convert a JSON file to the Amazon ION format.

yaml
id: json_to_ion
namespace: company.team

tasks:
  - id: http_download
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/json/products.json

  - id: to_ion
    type: io.kestra.plugin.serdes.json.JsonToIon
    from: "{{ outputs.http_download.uri }}"
Properties

Source file URI

DefaultUTF-8

The name of a supported charset

Default value is UTF-8.

Defaulttrue

Whether the file is newline-delimited JSON (JSONL)

Whether the file uses newline-delimited JSON. Warning: if not, the whole file will be loaded into memory and can lead to out-of-memory errors.

Reference (ref) of the pluginDefaults to apply to this task.

Default0

The number of records converted

Formaturi

URI of a temporary result file

Number of records converted