Package org.apache.juneau.marshall.hocon
package org.apache.juneau.marshall.hocon
HOCON (Human-Optimized Config Object Notation) format serializer and parser for Apache Juneau.
HOCON is a superset of JSON used extensively in the JVM ecosystem (Akka, Play, sbt, Spark, Kafka) for configuration. It extends JSON with:
- Path expressions —
a.b.c = value creates nested objects - Equals sign separator —
key = value (HOCON convention) - Unquoted strings — keys and values without quotes when unambiguous
- Object merging — duplicate keys merge instead of overwrite
- Substitutions —
${var} and${?var} references (parse only) - Triple-quoted strings —
"""...""" with no escape processing - Comments —
# and// - Optional root braces — top-level without
{}
Bean mapping
Round-trip fidelity matches JSON: beans, maps, lists, primitives, dates (ISO 8601), and Duration all round-trip. Substitutions and value concatenation are resolved during parse; the serializer always writes concrete values.
Usage:
String
See Also:
-
ClassDescriptionAnnotation for customizing HOCON serialization and parsing behavior on classes, methods, and fields.Utility classes and methods for the
@Hoconannotation.Dynamically applies a@Hoconannotation to specified classes, methods, or fields.A collection of@HoconApply annotations.Utility classes and methods for the@HoconApplyannotation.Applies targetedHoconApplyannotations to aContext.Builder.Builder class.Metadata on bean properties specific to HOCON serializers and parsers.Metadata on classes specific to HOCON serializers and parsers.Annotation for specifying config properties defined inHoconSerializerandHoconParser.Utility classes and methods for the@HoconConfigannotation.AppliesHoconConfigannotations to anHoconParser.Builder.AppliesHoconConfigannotations to anHoconSerializer.Builder.Interface for providing access toHoconClassMetaandHoconBeanPropertyMetaobjects.Parses HOCON (Human-Optimized Config Object Notation) text into POJO models.Builder class.Session for parsing HOCON format into POJOs.Builder for HOCON parser session.Resolves ${var} and ${?Serializes POJO models to HOCON (Human-Optimized Config Object Notation).Builder class.Session for serializing objects to HOCON format.Builder for HOCON serializer session.Tokenizer for HOCON (Human-Optimized Config Object Notation) format.A token with optional string or number value.Token types produced by the tokenizer.Intermediate representation for parsed HOCON data before conversion to Java beans.HOCON array (maps to List or array).HOCON boolean value.HOCON value concatenation (adjacent values concatenated).HOCON null value.HOCON number value.HOCON object (maps to Java bean or Map).HOCON string value.HOCON substitution reference (${var} or ${?Value type.Specialized writer for serializing HOCON format.