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

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
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.

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 rendering timestamps

All ION timestamp values are rendered using this timezone, even if the source timestamp carries its own offset. Defaults to the system timezone.

Default0

The number of records converted

Formaturi

URI of a temporary result file

Number of records converted