Rison data format

Jackson JSON parser Support for the Rison data format

Лицензия

Лицензия

Категории

Категории

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

Группа

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

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

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

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

2.9.10.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Rison data format
Jackson JSON parser Support for the Rison data format
Ссылка на сайт

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

http://github.com/bazaarvoice/rison
Система контроля версий

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

https://github.com/bazaarvoice/rison

Скачать rison

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-core jar 2.10.2

test (2)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-databind jar 2.10.2
org.testng : testng jar 7.0.0

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

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

Rison Parser and Generator for Jackson

A plugin for the Jackson streaming JSON processor v2.10.x that adds support for reading and writing JSON objects in the Rison serialization format. Support for Jackson:

Rison expresses the exact same data structures as JSON, but is much more compact and readable than JSON when encoded in a URI.

See https://github.com/Nanonid/rison for more information about Rison.

Usage

In your code, create a RisonFactory instead of a JsonFactory. Then read and write objects just as you do regular JSON objects. All the Jackson mapper facilities are available with Rison.

import com.bazaarvoice.jackson.rison.RisonFactory;

ObjectMapper RISON = new ObjectMapper(new RisonFactory());

String string = "(a:0,b:foo,c:'23skidoo')";
Map map = RISON.readValue(string, Map.class);
...
RISON.writeValueAsString(map);

O-Rison

If you know the value you wish to serialize is always an object, you can configure the RisonFactory to omit the containing ( and ) characters.

ObjectMapper O_RISON = new ObjectMapper(new RisonFactory().
    enable(RisonGenerator.Feature.O_RISON).
    enable(RisonParser.Feature.O_RISON));

String string = "a:0,b:foo,c:'23skidoo'";
Map map = O_RISON.readValue(string, Map.class);
...
System.out.println(O_RISON.writeValueAsString(map));

A-Rison

If you know the value you wish to serialize is always an array, you can configure the RisonFactory to omit the containing !( and ) characters.

ObjectMapper A_RISON = new ObjectMapper(new RisonFactory().
    enable(RisonGenerator.Feature.A_RISON).
    enable(RisonParser.Feature.A_RISON));

String string = "item1,item2,item3";
List list = A_RISON.readValue(string, List.class);
...
System.out.println(A_RISON.writeValueAsString(list));

Other Implementations

See the Rison page for implementations in JavaScript, Python and Ruby.

com.bazaarvoice.jackson

Bazaarvoice

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

Версия
2.9.10.2
2.9.4
2.6.3
2.1.1