Fork me on GitHub

Loaders

Loaders handle serializing a ConfigurationNode structure to or from a target, providing load and save operations for any node.

Loaders are created using builders, which allow setting options on a then-immutable configuration loader. Builders accept CharSources and CharSinks (from Guava) as the objects to load and save data with.

Implementations

YAML

Format: YAML

Artifact ID: configurate-yaml

Options

  • Indent: How many spaces wide an indentation level should be
  • Flow style: Block, Flow, or have the yaml library pick. These flow styles are defined in the YAML spec

Hocon

Format: HOCON

Artifact ID: configurate-hocon

Options

The HoconConfigurationLoader’s builder exposes ConfigParseOptions and ConfigRenderOptions

Jackson

Format: JSON

Artifact ID: configurate-json

Options

  • The JsonFactory is exposed in the builder to set features on
  • indent is configurable
  • the spacing style of field key-value separators is configurable

Gson

Format: JSON

Artifact ID: configurate-gson

Options

  • indent: number of spaces wide an indent should be
  • lenient: whether the parser should handle processes leniently