
Serialization IonToJson
CertifiedConvert an ION file into a JSONL file
Serialization IonToJson
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.
type: io.kestra.plugin.serdes.json.IonToJsonExamples
Convert an ION file to newline-delimited JSON (JSONL).
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
from *string
Source file URI
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
assets
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150charset string
UTF-8The name of a supported charset
Default value is UTF-8.
newLine booleanstring
trueWhether 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.
shouldKeepAnnotations booleanstring
falseShould keep ION annotations in the output JSON
If true, ION annotations will be preserved in the output JSON. Default is false.
timeZoneId string
Etc/UTCTimezone 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.
Outputs
size integer
0The number of records converted
uri string
uriURI of a temporary result file
Metrics
records counter
Number of records converted