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.
- Alphabetic
- By Inheritance
- YAML
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
YamlEngineExceptionis thrown if a stream cannot be parsed, holds more than one document, or is rooted at something other than a mapping
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated