Kotlin implementation of JSON Pointer

Parent POM for Maven Kotlin projects

Лицензия

Лицензия

Категории

Категории

Kotlin Языки программирования Сеть JSON Данные
Группа

Группа

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

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

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

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

0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Kotlin implementation of JSON Pointer
Parent POM for Maven Kotlin projects
Ссылка на сайт

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

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

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

https://github.com/pwall567/json-kotlin-pointer

Скачать json-kotlin-pointer

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
net.pwall.json : jsonutil jar 3.1
net.pwall.util : javautil jar 2.2
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.0
org.jetbrains.kotlin : kotlin-reflect jar 1.4.0

test (1)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-test-junit jar 1.4.0

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

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

json-kotlin-pointer

Kotlin implementation of JavaScript Object Notation (JSON) Pointer.

Quick Start

This library uses the JSON classes from the jsonutil library. The examples below assume the existence of a JSONObject similar to the one created as follows:

    val json = JSON.parseObject("""{"list":[{"aaa":1},{"aaa":2}]}""")

To create a JSON Pointer from a string:

    val pointer = JSONPointer("/list/0")

This pointer selects the property named "list" from the object, and then selects the first itemfrom the array.

To use the pointer, all of the following three forms are equivalent:

    val result = pointer.eval(json)
    val result = json locate pointer
    val result = json locate "/list/0"

In each case, result will contain the JSONObject representing the nested object:

{"aaa":1}

More information to follow.

Dependency Specification

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

Maven

    <dependency>
      <groupId>net.pwall.json</groupId>
      <artifactId>json-kotlin-pointer</artifactId>
      <version>0.3</version>
    </dependency>

Gradle

    implementation 'net.pwall.json:json-kotlin-pointer:0.3'

Gradle (kts)

    implementation("net.pwall.json:json-kotlin-pointer:0.3")

Peter Wall

2020-09-16

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

Версия
0.3
0.2
0.1