Packages

object YAML

YAML backend for the cfg protocol.

Load one or more YAML files and receive a Node.IMap[Id.Root] ready for decoding. Parsing is done by snakeyaml-engine with the YAML 1.2 core schema, so ~, null, Null and NULL are 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. tag holds the tag as it was written in the source, already expanded through the tag handles in effect (!!int becomes tag:yaml.org,2002:int, a local !postgres stays !postgres). It is None whenever 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

apply builds its own parser per call and shares no mutable state; the returned tree is immutable.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. YAML
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(urls: URL*): IMap[Root]

    Loads and overlays the given YAML URLs into a single config tree.

    Loads and overlays the given YAML URLs into a single config tree.

    urls

    zero or more URLs to YAML files, each holding a single document; an empty argument list returns an empty root map

    returns

    the root map node of the overlaid config tree

    Note

    a YamlEngineException is thrown if a stream cannot be parsed, holds more than one document, or is rooted at something other than a mapping

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped