JSON Streaming library

JSON Streaming library for Java

Лицензия

Лицензия

Категории

Категории

Сеть JSON Данные
Группа

Группа

net.pwall.json
Идентификатор

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

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

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

0.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

JSON Streaming library
JSON Streaming library for Java
Ссылка на сайт

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

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

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

https://github.com/pwall567/json-stream.git

Скачать json-stream

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
net.pwall.json : jsonutil jar 5.0
net.pwall.util : pipelines jar 0.9

test (1)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar 5.6.0

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

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

json-stream

JSON Streaming library for Java

This library allows JSON input to be parsed on the fly, avoiding the need to allocate memory for the largest possible input.

To use:

    JSONStream stream = new JSONStream();

As each character is received (for example, from an HTTP connection):

    stream.accept(ch)

When all characters have been processed:

    stream.close();

(If the characters are being read from a Reader, the EOF character may be passed to the stream; this will have the same effect as close().)

Alternatively, a String may be sent in a single operation (although this defeats the purpose of a byte-by-byte parser!); in this case the close() will be sent to the stream at the end of the data.

The resulting JSONValue (for example, a JSONObject) is available by calling:

    JSONValue = stream.getResult();

Pipeline

And now - JSONArrayPipeline. This class takes an Acceptor as a constructor argument (see pipelines), and as characters are fed to it from the string form of a JSON array, the parsed array elements are passed to the consumer. See the test for an example.

Dependency Specification

The latest version of the library is 0.8, and it may be obtained from the Maven Central repository.

Maven

    <dependency>
      <groupId>net.pwall.json</groupId>
      <artifactId>json-stream</artifactId>
      <version>0.8</version>
    </dependency>

Gradle

    implementation 'net.pwall.json:json-stream:0.8'

Gradle (kts)

    implementation("net.pwall.json:json-stream:0.8")

Peter Wall

2021-04-20

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

Версия
0.8
0.7.1
0.7
0.6
0.5
0.4
0.3
0.2
0.1