ToonToJson​Toon​To​Json

Convert a TOON file into JSON.

Parses a TOON (Token-Oriented Object Notation) document and converts it to JSON. Supports TOON 2.0 features emitted by JsonToToon:

  • indentation-based structure
  • primitive arrays (inline)
  • tabular arrays
  • list arrays
  • objects and arrays as list items
  • canonical primitives (true/false/null/numbers)
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

Default UTF-8

The name of a supported charset

Default value is UTF-8.

Format uri

URI of the resulting JSON file

Number of records parsed