Pustike JSON

JSON Object Mapper using Jakarta JSON-P

License

License

Categories

Categories

JSON Data
GroupId

GroupId

io.github.pustike
ArtifactId

ArtifactId

pustike-json
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Pustike JSON
JSON Object Mapper using Jakarta JSON-P
Project URL

Project URL

https://github.com/pustike/pustike-json

Download pustike-json

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
jakarta.json : jakarta.json-api jar 2.0.0

test (4)

Group / Artifact Type Version
org.glassfish : jakarta.json jar 2.0.0
io.jsonwebtoken : jjwt-impl jar 0.11.2
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.junit.jupiter : junit-jupiter-engine jar 5.7.0

Project Modules

There are no modules declared in this project.

Pustike JSON

Contains ObjectMapper class that can create Java objects from JSON or create JSON value from Java objects, by using Jakarta JSON-P APIs internally.

The key feature of this object mapper is its ability to generate JSON values with only specified list of fields/properties of an object depending on the given context. For ex, when a list of customer objects are being shown in a select field, very few properties like code and name, are required. But when editing the same customer object, many additional properties are needed which can be defined in another context. This helps in reducing the transferred data size when communicating with JSON objects in the API.

Following are some of its features:

  • Read JSON text and convert it to the given type.
  • Convert an object to JsonValue, optionally in the given context to include listed fields only.
  • @JsonIncludes allows multiple contexts to be defined on a class with each of them listing fields to be included in JSON format.
  • A TypeConverter utility class to convert objects between given source and target types.

Dependencies

This library requires Java 11 and following modules:

Group Id Artifact Id Version
jakarta.json jakarta.json-api 2.0.0
org.glassfish jakarta.json 2.0.0

Documentation: Latest javadocs is available here.

Download

To add a dependency using Maven, use the following:

<dependency>
    <groupId>io.github.pustike</groupId>
    <artifactId>pustike-json</artifactId>
    <version>0.2.0</version>
</dependency>

Or, download the latest JAR(~21kB) from Maven Central.

License

This library is published under the Apache License, Version 2.0

io.github.pustike

Pustike

Versions

Version
0.2.0
0.1.0