Serialization IonToJson

Serialization IonToJson

Certified

Convert an ION file into a JSONL file

Outputs one JSON line per ION record by default; set newLine to false to produce a JSON array instead. ION timestamps use the configured timeZoneId. Set shouldKeepAnnotations to true to preserve ION type annotations as ion_annotations fields in the output.

yaml
type: io.kestra.plugin.serdes.json.IonToJson

Convert an ION file to newline-delimited JSON (JSONL).

yaml
id: ion_to_json
namespace: company.team

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

  - id: convert
    type: io.kestra.plugin.serdes.csv.CsvToIon
    from: "{{ outputs.http_download.uri }}"

  - id: to_json
    type: io.kestra.plugin.serdes.json.IonToJson
    from: "{{ outputs.convert.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.

Defaultfalse

Should keep ION annotations in the output JSON

If true, ION annotations will be preserved in the output JSON. Default is false.

DefaultEtc/UTC

Timezone to use when no timezone can be parsed on the source

Default0

The number of records converted

Formaturi

URI of a temporary result file

Number of records converted