Package org.aeonbits.owner.formats.yaml


package org.aeonbits.owner.formats.yaml
Reads a configuration written in YAML - a source whose path ends in .yaml or .yml - flattening it into the keys the rest of the library already speaks.

A documented subset, not a YAML implementation. Block mappings and sequences, quoted and plain scalars, block scalars with their chomping, flow collections and comments are read; anchors, aliases and merge keys, tags, complex keys, a second document in the same file, and a value continued onto the next line without | or > are refused by name and by line. A parser that half-understood any of them would change the meaning of somebody's file instead of declining it.

That is also why YamlParser is around seven hundred lines rather than several thousand: the mapping interface declares the types, so the implicit typing that turns no into false - the Norway problem - is work that never arises here. A scalar is handed back as the text it was written with.

  • Classes
    Class
    Description
    A loader for YAML, reading a source whose path ends in .yaml or .yml.