Packages

object HOCON

HOCON/YAML backend for the cfg protocol.

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 withFallback semantics. After merging, ConfigFactory.load is called so that variable substitutions are resolved before the tree is returned.

YAML support

YAML files are parsed via io.h8:typesafe-config-yaml with stringsOnly = true. This aligns with the protocol contract: Node.IScalar always 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.toString on the parsed Java object, so the string stored in Node.IScalar may not match the original text in the file exactly (e.g. a number written as 1e5 may come back as 100000.0).

YAML tags are not propagated; the tag field is always None.

Thread safety

The shared ConfigLoader is stateless after construction and safe for concurrent use.

Source
HOCON.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HOCON
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 merges the given HOCON/YAML URLs into a single config tree.

    Loads and merges the given HOCON/YAML URLs into a single config tree.

    urls

    zero or more URLs to HOCON or YAML files; an empty argument list returns the result of ConfigFactory.load (system properties + reference.conf + application.conf on the classpath)

    returns

    the root map node of the merged, substitution-resolved config tree

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  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
    @IntrinsicCandidate() @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  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(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped