package hocon
- Source
- package.scala
- Alphabetic
- By Inheritance
- hocon
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- object HOCON
HOCON/YAML backend for the
cfgprotocol.HOCON/YAML backend for the
cfgprotocol.Load one or more HOCON or YAML files and receive a
Node.IMap[Id.Root]ready for decoding.Merging and substitution
When multiple URLs are supplied they are merged in order — later files take precedence over earlier ones (last-wins), following Typesafe Config's
withFallbacksemantics. After merging,ConfigFactory.loadis called so that variable substitutions are resolved before the tree is returned.YAML support
YAML files are parsed via
io.h8:typesafe-config-yamlwithstringsOnly = true. This aligns with the protocol contract:Node.IScalaralways carries a raw string, and type conversion is the decoder's responsibility.HOCON and JSON files, however, go through Typesafe Config's own parser, which infers types (booleans, numbers, lists, etc.) before this library can see the values. Scalars are then recovered by calling
unwrapped.toStringon the parsed Java object, so the string stored inNode.IScalarmay not match the original text in the file exactly (e.g. a number written as1e5may come back as100000.0).YAML tags are not propagated; the
tagfield is alwaysNone.Thread safety
The shared
ConfigLoaderis stateless after construction and safe for concurrent use.