Available

amalgame-yaml

YAML 1.2 subset reader.

amc package add yaml GitHub ↗ ← Back to the ecosystem

Overview

YAML 1.2 reader (subset sufficient for nearly all config files). No exotic tags, no YAML 1.1 booleans, no !!python/object. Mappings, sequences, scalars, anchors and aliases.

Features

  • YAML 1.2 mappings, sequences, scalars
  • Anchors (&name) and aliases (*name)
  • Automatic mapping onto Amalgame structures
  • Errors with precise line+column
  • Pure Amalgame

Example

Minimal usage example — copy-paste runnable after install.

amc package add yaml

let cfg = Yaml.Parse(File.ReadText("config.yml"))
let port = cfg.GetMap("server").GetInt("port")

At a glance

Related packages