Serialization ToonToJson

Serialization ToonToJson

Certified

Convert a TOON file into JSON

Parses TOON (Token-Oriented Object Notation) and converts it to JSON. Supports all TOON 3.0 structures produced by JsonToToon: tabular arrays, inline primitive arrays, nested objects, and canonical primitives.

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

Convert a TOON file to JSON.

yaml
id: toon_to_json
namespace: company.team

tasks:
  - id: create_toon
    type: io.kestra.plugin.core.storage.Write
    extension: toon
    content: |
      products[2]{id,name,price}:
        1,Apple,1.2
        2,Banana,0.9
      metadata:
        category: fruits
        country: France

  - id: to_json
    type: io.kestra.plugin.serdes.json.ToonToJson
    from: "{{ outputs.create_toon.uri }}"
Properties

Source TOON file URI

DefaultUTF-8

The name of a supported charset

Default value is UTF-8.

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

Default0

The number of records converted

Formaturi

URI of the resulting JSON file

Number of records parsed