Package org.apache.juneau.marshall.hjson
Hjson extends JSON with human-friendly features designed for configuration files and hand-edited data:
- Quoteless strings — values without quotes when unambiguous (e.g.
name: Alice ) - Multiline strings — triple single-quote
''' blocks with indentation stripping - Comments —
# ,// , and block comments (/* ... */ ) - Optional commas — newlines can separate object members and array elements
- Trailing commas — ignored
- Unquoted keys — object keys need not be quoted when safe
- Root-braceless objects — top-level content without wrapping
{} (parse only)
Syntax summary
Strings: quoteless (to end of line), double-quoted, single-quoted, or multiline
Java mapping
Objects →
Usage:
String
See Also:
-
ClassDescriptionAnnotation for customizing Hjson serialization and parsing behavior on classes, methods, and fields.Utility classes and methods for the
@Hjsonannotation.Dynamically applies a@Hjsonannotation to specified classes, methods, or fields.A collection of@HjsonApply annotations.Utility classes and methods for the@HjsonApplyannotation.Applies targetedHjsonApplyannotations to aContext.Builder.Builder class.Metadata on bean properties specific to Hjson serializers and parsers.Metadata on classes specific to Hjson serializers and parsers.Annotation for specifying config properties defined inHjsonSerializerandHjsonParser.Utility classes and methods for the@HjsonConfigannotation.AppliesHjsonConfigannotations to anHjsonParser.Builder.AppliesHjsonConfigannotations to anHjsonSerializer.Builder.Interface for providing access toHjsonClassMetaandHjsonBeanPropertyMetaobjects.Parses Hjson (Human JSON) text into POJO models.Builder class.Session for parsing Hjson format into POJOs.Builder for Hjson parser session.Serializes POJO models to Hjson (Human JSON).Builder class.Session for serializing objects to Hjson format.Builder for Hjson serializer session.Tokenizer for Hjson format.A token with optional string or number value.Token types produced by the tokenizer.Specialized writer for serializing Hjson format.