laika.parse.hocon

Type members

Classlikes

An array value with all its elements.

An array value with all its elements.

case class BuilderField(key: Either[InvalidStringValue, Key], value: ConfigBuilderValue)

A single field of an object value.

A single field of an object value.

Companion:
object
Companion:
class
case class ConcatPart(whitespace: String, value: ConfigBuilderValue)

A single part of a concatenated value with the whitespace between this and the previous value preserved.

A single part of a concatenated value with the whitespace between this and the previous value preserved.

case class ConcatValue(first: ConfigBuilderValue, rest: Seq[ConcatPart]) extends ConfigBuilderValue

A concatenated value (either all objects, all arrays, all simple values or invalid).

A concatenated value (either all objects, all arrays, all simple values or invalid).

sealed trait ConfigBuilderValue extends Product with Serializable

The base trait of the interim configuration model (usually obtained from a HOCON parser).

The base trait of the interim configuration model (usually obtained from a HOCON parser).

This type is not exposed to public APIs as it will be translated to a final object structure later. It contains instances representing interim constructs like concatenated values or substitution variables which will not be present in the final model.

Translates the interim configuration model (usually obtained from a HOCON parser) into the final object model. It turns a root ObjectBuilderValue into a root ObjectValue.

Translates the interim configuration model (usually obtained from a HOCON parser) into the final object model. It turns a root ObjectBuilderValue into a root ObjectValue.

The translation step involves the following steps:

  • Expand keys (e.g. { a.b.c = 7 } will become { a = { b = { c = 7 }}}

  • Merge objects with a common base path

  • Merge concatenated values (e.g. [1,2] [3,4] will become [1,2,3,4]

  • Resolve substitution variables (potentially using the provided fallback if not found in in the provided unresolved root)

  • Expand keys (e.g. { a.b.c = 7 } will become `{ a = { b = { c = 7 }}}

  • Merge objects with a common base path

  • Merge concatenated values (e.g. [1,2] [3,4] will become [1,2,3,4]

  • Resolve substitution variables (potentially using the provided fallback if not found in in the provided unresolved root)

The parser implementation for the HOCON format.

The parser implementation for the HOCON format.

It currently supports the full spec as documented in https://github.com/lightbend/config/blob/master/HOCON.md.

case class IncludeAny(resourceId: StringBuilderValue, isRequired: Boolean) extends IncludeResource
case class IncludeClassPath(resourceId: StringBuilderValue, isRequired: Boolean) extends IncludeResource
case class IncludeFile(resourceId: StringBuilderValue, isRequired: Boolean) extends IncludeResource
sealed trait IncludeResource

Description of a resource to be included in the current configuration.

Description of a resource to be included in the current configuration.

case class IncludeUrl(resourceId: StringBuilderValue, isRequired: Boolean) extends IncludeResource
case class InvalidStringValue(value: String, failure: Failure) extends StringBuilderValue
case class MergedValue(values: Seq[ConfigBuilderValue]) extends ConfigBuilderValue

A merged value with "last one wins" semantics for the provided values (objects will be merged instead).

A merged value with "last one wins" semantics for the provided values (objects will be merged instead).

case class ObjectBuilderValue(values: Seq[BuilderField]) extends ConfigBuilderValue

An object value with all its fields.

An object value with all its fields.

A simple configuration value that does not need to be recursively resolved.

A simple configuration value that does not need to be recursively resolved.

case object SelfReference extends ConfigBuilderValue

A marker for a self reference, a reference to an earlier definition with the same key.

A marker for a self reference, a reference to an earlier definition with the same key.

case class SubstitutionValue(ref: Key, optional: Boolean) extends ConfigBuilderValue

A substitution reference that may be marked as optional.

A substitution reference that may be marked as optional.

Companion:
object
Companion:
class
case class ValidStringValue(value: String) extends StringBuilderValue