HOCON support for Jackson

HOCON dataformat implementation for Jackson

Лицензия

Лицензия

Категории

Категории

AWS Контейнер PaaS Providers Данные Jackson JSON ORM
Группа

Группа

com.jasonclawson
Идентификатор

Идентификатор

jackson-dataformat-hocon
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

HOCON support for Jackson
HOCON dataformat implementation for Jackson
Ссылка на сайт

Ссылка на сайт

https://github.com/jclawson/jackson-dataformat-hocon
Система контроля версий

Система контроля версий

https://github.com/jclawson/jackson-dataformat-hocon/

Скачать jackson-dataformat-hocon

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.jasonclawson/jackson-dataformat-hocon/ -->
<dependency>
    <groupId>com.jasonclawson</groupId>
    <artifactId>jackson-dataformat-hocon</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.jasonclawson/jackson-dataformat-hocon/
implementation 'com.jasonclawson:jackson-dataformat-hocon:1.1.0'
// https://jarcasting.com/artifacts/com.jasonclawson/jackson-dataformat-hocon/
implementation ("com.jasonclawson:jackson-dataformat-hocon:1.1.0")
'com.jasonclawson:jackson-dataformat-hocon:jar:1.1.0'
<dependency org="com.jasonclawson" name="jackson-dataformat-hocon" rev="1.1.0">
  <artifact name="jackson-dataformat-hocon" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.jasonclawson', module='jackson-dataformat-hocon', version='1.1.0')
)
libraryDependencies += "com.jasonclawson" % "jackson-dataformat-hocon" % "1.1.0"
[com.jasonclawson/jackson-dataformat-hocon "1.1.0"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-core jar 2.4.1.1
com.fasterxml.jackson.core : jackson-annotations jar 2.4.1
com.fasterxml.jackson.core : jackson-databind jar 2.4.1.1
com.typesafe : config jar 1.2.1

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10

Модули Проекта

Данный проект не имеет модулей.

HOCON Jackson data format

Implementation of a Jackson parser for parsing the HOCON data format.

What the heck is HOCON?

HOCON stands for Human-Optimized Config Object Notation and is made by Typesafe.

In short, HOCON combines YAML, JSON, and Properties files into a single format. On most cases, YAML, JSON, and Properties formats are all valid HOCON--- and it can be mixed and matched at will. Check out the HOCON docs for more detail on the format.

Why this project?

This project lets you use HOCON to configure any application that uses Jackson to parse its configuration files.

How to Use

Add the following fragment to your project pom to include HOCON data format:

  <dependency>
    <groupId>org.honton.chas.hocon</groupId>
    <artifactId>jackson-dataformat-hocon</artifactId>
    <version>1.1.1</version>
  </dependency>

Create the Jackson ObjectMapper with the following constructor:

  ObjectMapper mapper = new ObjectMapper(new HoconFactory());

Some Caveats

There is support for HOCON include statements if the URL or File version of ObjectMapper is used. (Unfortunately, the Jackson InputDecorator will be ignored).

  Configuration c = mapper.readValue(new URL("http://example.com/path/test.conf"), Configuration.class);

or

  Configuration c = mapper.readValue(new File(filepath), Configuration.class);

There is support for Jackson InputDecorator if the InputStream or Reader version of ObjectMapper is used. (Unfortunately, the HOCON statements include will be ignored).

  Configuration c = mapper.readValue(new FileInputStream("http://example.com/path/test.conf"), Configuration.class);

or

  Configuration c = mapper.readValue(new InputStreamReader(is), Configuration.class);

Build Status Maven Central Javadoc

Версии библиотеки

Версия
1.1.0
1.0.13
1.0.8