UCE Test: YAML

yaml_encode() and yaml_decode() convert concise config-style YAML to and from DValue values.

Config Source

# UCE app config
app:
  name: UCE Starter
  debug: true
  port: 8080
  paths:
    - site
    - cache
message: |
  Keep config files readable.
  Load them as DValue values.

Decoded DValue

{"app": {"debug": true, "name": "UCE Starter", "paths": ["site", "cache"], "port": "8080"}, "message": "Keep config files readable.\nLoad them as DValue values."}

Encoded Again

app:
  debug: true
  name: UCE Starter
  paths:
    - site
    - cache
  port: "8080"
message: |
  Keep config files readable.
  Load them as DValue values.

Generated Config

database:
  host: localhost
  port: 3306
features:
  components: true
  markdown: true
themes:
  - clean
  - compact

Round Trip Reads

app.name = UCE Starter
app.debug = true
app.port = 8080
app.paths[1] = cache

yaml_encode() docs | yaml_decode() docs