com.infilos:relax-json-java

A simple jackson wrapper to simplify the interaction between java and scala.

License

License

Categories

Categories

Java Languages JSON Data
GroupId

GroupId

com.infilos
ArtifactId

ArtifactId

relax-json-java
Last Version

Last Version

2.11.3-0
Release Date

Release Date

Type

Type

jar
Description

Description

A simple jackson wrapper to simplify the interaction between java and scala.
Source Code Management

Source Code Management

https://github.com/infilow/relax-json/tree/master/relax-json-java

Download relax-json-java

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.11.3
com.fasterxml.jackson.datatype : jackson-datatype-jsr310 jar 2.11.3
com.fasterxml.jackson.datatype : jackson-datatype-jdk8 jar 2.11.3
com.fasterxml.jackson.module : jackson-module-parameter-names jar 2.11.3
org.apache.commons : commons-lang3 jar 3.9
org.apache.commons : commons-text jar 1.8

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

relax-json

A simple jackson wrapper to simplify the interaction between java and scala.

Jackson for only Java

<dependency>
    <groupId>com.infilos</groupId>
    <artifactId>relax-json-java</artifactId>
    <version>LATEST</version>
</dependency>

Jackson for Java with Scala support

Current supported Scala binary version is 2.12.

<dependency>
    <groupId>com.infilos</groupId>
    <artifactId>relax-json-scala</artifactId>
    <version>LATEST</version>
</dependency>

Then you can register shared module between java and scala:

JsonMappers.register(yourCustomModule)

Register serializer/deserializer instance

Jackson provide annotations @JsonSerialize/@JsonDeserialize to register custom serdes Class, but sometime you may want to register instance.

class DomainSerdes extends JsonSerdes[Domain] {
  override def onClass:Class[Domain] = classOf[Domain]
  override def serializer:JsonSerializer[Domain] = ???     /* Instance */
  override def deserializer:JsonDeserializer[Domain] = ??? /* Instance */
}

Then configure with SPI file resources/META-INF/services/com.infilos.relax.json.JsonSerdes:

com.domain.example.Doman$DomainSerdes /* Doman is a companion object */

Jackson version

Version is defined as 2.11.0-0, 2.11.0 is the jackson release version, -0 means this tookit's version.

Contributions

Version

  1. Increase build version: bash version.sh -b
  2. Change jackson release version: bash version.sh -j 2.11.0

Release

  • Snapshot: mvn clean deploy
  • Release: mvn clean package source:jar gpg:sign install:install deploy:deploy

Versions

Version
2.11.3-0
2.11.2-1
2.11.0-1