neco-yml
zero dependency YAML subset parser.
Features
- Line-oriented
key: valueparsing - Empty values followed by
- itemlines converted to lists - Scalar parsing for null, bool, number, and string values
- Field order preserved as
Vec<(String, YmlValue)> ParseErrorwith line-oriented position and message
Usage
Parse
use ;
let value = parse.unwrap;
assert!;
Read fields
use ;
let value = parse.unwrap;
let Map = value else ;
assert!;
API
| Item | Description |
|---|---|
parse(input: &str) -> Result<YmlValue, ParseError> |
Parses the supported YAML subset |
YmlValue |
Null, Bool, Number(f64), String, List, or ordered Map |
ParseError |
Reports line position and message |
Format support
The supported subset covers flat configuration-shaped YAML with scalar values and simple lists. It preserves duplicate keys in source order and does not implement anchors, tags, merge keys, or full YAML document streams.
License
MIT