com.infilos:relax-json-scala

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

License

License

Categories

Categories

Scala Languages JSON Data
GroupId

GroupId

com.infilos
ArtifactId

ArtifactId

relax-json-scala
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-scala

Download relax-json-scala

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
com.infilos : relax-json-java jar 2.11.3-0
org.scala-lang : scala-library jar 2.12.11
com.fasterxml.jackson.module : jackson-module-scala_2.12 jar 2.11.3

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