package yaml
- Alphabetic
- By Inheritance
- yaml
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
object
YAML
YAML backend for the
cfgprotocol.YAML backend for the
cfgprotocol.Load one or more YAML files and receive a
Node.IMap[Id.Root]ready for decoding. Parsing is done bysnakeyaml-enginewith the YAML 1.2 core schema, so~,null,NullandNULLare nulls, and<<merge keys are resolved while composing.Merging
When multiple URLs are supplied they are overlaid in order — later files take precedence over earlier ones (last-wins). Mappings are merged recursively, key by key; scalars and sequences are replaced outright rather than concatenated. An empty argument list yields an empty root map. Unlike the HOCON backend there is no substitution step: a YAML file is taken exactly as written.
Tags
Unlike the HOCON backend, this one reports tags.
tagholds the tag as it was written in the source, already expanded through the tag handles in effect (!!intbecomestag:yaml.org,2002:int, a local!postgresstays!postgres). It isNonewhenever the tag was inferred by the resolver rather than written down, and also for the non-specific tag!, which says nothing about the type. Scalars are always carried as raw strings — a tag never converts a value, it only records what the author asked for, and acting on it is the decoder's business.Duplicate keys
A mapping that repeats a key keeps the last occurrence, matching the last-wins rule used for merging.
Thread safety
applybuilds its own parser per call and shares no mutable state; the returned tree is immutable.