Configurate Jackson

A simple configuration library for Java applications that can handle a variety of formats and provides a node-based data structure able to handle a wide variety of configuration schemas

License

License

Categories

Categories

config Application Layer Libs Configuration Configurate JSON Data
GroupId

GroupId

me.lucko.configurate
ArtifactId

ArtifactId

configurate-json
Last Version

Last Version

3.5
Release Date

Release Date

Type

Type

jar
Description

Description

Configurate Jackson
A simple configuration library for Java applications that can handle a variety of formats and provides a node-based data structure able to handle a wide variety of configuration schemas

Download configurate-json

How to add to project

<!-- https://jarcasting.com/artifacts/me.lucko.configurate/configurate-json/ -->
<dependency>
    <groupId>me.lucko.configurate</groupId>
    <artifactId>configurate-json</artifactId>
    <version>3.5</version>
</dependency>
// https://jarcasting.com/artifacts/me.lucko.configurate/configurate-json/
implementation 'me.lucko.configurate:configurate-json:3.5'
// https://jarcasting.com/artifacts/me.lucko.configurate/configurate-json/
implementation ("me.lucko.configurate:configurate-json:3.5")
'me.lucko.configurate:configurate-json:jar:3.5'
<dependency org="me.lucko.configurate" name="configurate-json" rev="3.5">
  <artifact name="configurate-json" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.lucko.configurate', module='configurate-json', version='3.5')
)
libraryDependencies += "me.lucko.configurate" % "configurate-json" % "3.5"
[me.lucko.configurate/configurate-json "3.5"]

Dependencies

compile (3)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.8.8
me.lucko.configurate : configurate-core jar 3.5
org.checkerframework : checker-qual Optional jar 2.4.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Configurate

Configurate is a simple configuration library released under the Apache 2.0 that provides a node-tree representation of configurations in a variety of formats.

The upstream repository is located at SpongePowered/configurate - but doesn't seem to be receiving any updates.

This fork of configurate contains the following changes:

  • Implemented a loader for the XML format (upstream PR #90)
  • Implemented a loader for the TOML format (upstream PR #69)
  • A considerable number of improvements to the projects JavaDocs (upstream PR #92)
  • Changed the TypeSerializerCollection to select from available type serializers in the order they were added (upstream PR #88)
  • Introduced more consistent formatting in the build scripts (upstream PR #92)
  • Fix object mapping for interface/abstract field types (upstream PR #91 by @dags-)

Building

We use Maven, so this part is pretty easy.

Configurate requires JDK 8 to build and run.

Make sure Maven is installed and from the project's directory (the root of this repository), run mvn clean install to build Configuate and install its artifacts to the local Maven repository.

Usage

Maven:

<dependency>
    <groupId>me.lucko.configurate</groupId>
    <artifactId>configurate-hocon</artifactId>
    <version>3.4</version>
</dependency>

Gradle:

repositories {
    mavenCentral()
}

dependencies {
    compile 'me.lucko.configurate:configurate-hocon:3.4'
}

This dependency statement is for the hocon format implementation. Other formats managed in this repository use the same group id and versioning.

Now, to load:

ConfigurationLoader<CommentedConfigurationNode> loader = HoconConfigurationLoader.builder().setPath(file).build(); // Create the loader
CommentedConfigurationNode node = loader.load(); // Load the configuration into memory

node.getNode("some", "value").getValue(); // Get the value

More detailed explanations of all the methods available in ConfigurationNode are available in the javadocs.

Contributing

We love PRs! However, when contributing, here are some things to keep in mind:

  • Take a look at open issues first before you get too far in -- someone might already be working on what you were planning on doing
  • In general, we follow the Oracle style guidelines for code style
  • Please, please, please test PRs. It makes the process a lot easier for everybody :)

Versions

Version
3.5
3.4