Working with TOML
Encode and decode to and from TOML.
Parse: Simple
Given a sample.toml file of:
A = "hello"
B = 12
then
yq -oy '.' sample.tomlwill output
A: hello
B: 12Parse: Deep paths
Given a sample.toml file of:
person.name = "hello"
person.address = "12 cat st"
then
will output
Encode: Scalar
Given a sample.toml file of:
then
will output
Parse: inline table
Given a sample.toml file of:
then
will output
Parse: Array Table
Given a sample.toml file of:
then
will output
Parse: Array of Array Table
Given a sample.toml file of:
then
will output
Parse: Empty Table
Given a sample.toml file of:
then
will output
Roundtrip: inline table attribute
Given a sample.toml file of:
then
will output
Roundtrip: table section
Given a sample.toml file of:
then
will output
Roundtrip: array of tables
Given a sample.toml file of:
then
will output
Roundtrip: arrays and scalars
Given a sample.toml file of:
then
will output
Roundtrip: simple
Given a sample.toml file of:
then
will output
Roundtrip: deep paths
Given a sample.toml file of:
then
will output
Roundtrip: empty array
Given a sample.toml file of:
then
will output
Roundtrip: sample table
Given a sample.toml file of:
then
will output
Roundtrip: empty table
Given a sample.toml file of:
then
will output
Roundtrip: comments
Given a sample.toml file of:
then
will output
Roundtrip: sample from web
Given a sample.toml file of:
then
will output
Encode: Simple mapping produces table section
Given a sample.yml file of:
then
will output
Last updated
Was this helpful?