Importing/exporting YAML values

Support for YAML parsing and rendering was first added in liquidsoap 2.2.0. This support follows the same pattern as JSON parsing/rendering but using yaml-based syntax, i.e.:

let yaml.parse ({
  name,
  version,
  scripts,
} : {
  name: string,
  version: string,
  scripts: {
    test: string?
  }?
}) = file.contents("/path/to/file.yaml")

and

r = {artist = "Bla", title = "Blo"}
print(yaml.stringify(r))

The only major difference being that, in YAML, all numbers are parsed and rendered as floats.

Please refer to the JSON parsing and rendering documentation for more details.