delight-json

Rendering of simple, human-readable JSON documents.

Лицензия

Лицензия

GPL
Категории

Категории

JSON Данные
Группа

Группа

org.javadelight
Идентификатор

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

delight-json
Последняя версия

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

0.0.5
Дата

Дата

Тип

Тип

bundle
Описание

Описание

delight-json
Rendering of simple, human-readable JSON documents.
Ссылка на сайт

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

https://github.com/javadelight/delight-json
Система контроля версий

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

https://github.com/javadelight/delight-json

Скачать delight-json

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
com.google.gwt : gwt-user jar 2.8.2

test (2)

Идентификатор библиотеки Тип Версия
org.eclipse.xtend : org.eclipse.xtend.lib.gwt jar 2.13.0
com.github.oehme.xtend : xtend-junit jar 0.0.1

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

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

Build Status

delight-json

delight-json is an extremely simple library to render human-readable JSON with Java.

Why: A simple and very portable way to generate beautiful, human-readable JSON.

delight-json is part of Java Delight.

Usage

JSON Objects

JSON json = JSON.create();

json.add("text", "hello");
json.add("number", 123);

json.print();

Results in:

{
    'text': 'hello',
    'number': '123'
}

Nested JSON Objects

JSON documents may be added as values to other JSON documents.

final JSON json = JSON.create();

json.add("text", "hello");
json.add("inner", JSON.create().add("number", 1234));

json.print();

Results in:

{
    'text': 'hello',
    'inner': {
        'number': '1234'
    }
}

JSON Arrays

Arrays can be added as values of JSON documents.

JSON json = JSON.create();
        
json.add("array", JSON.createArray().push("1").push("2").push("3"));

json.print();

Results in:

{
    'array': [
        '1',
        '2',
        '3'
    ]
}

Rendering

Documents can either be printed to standard out:

json.print();

Or rendered as String:

String str = json.render();

Maven Dependency

<dependency>
    <groupId>org.javadelight</groupId>
	<artifactId>delight-json</artifactId>
	<version>[latest version]</version>
</dependency>

This artifact is available on Maven Central and BinTray.

Maven Central

Compatibility

This project is compatible with the following environments:

  • Java 1.6+
  • GWT 2.5.0+
  • Android (any)
  • OSGi (any)

Further Resources

Licenses

  • Apache 2.0

  • MIT

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

Версия
0.0.5