rjmac / rojoma-json-grisu

DoubleWriter provider that uses grisu-scala

Version Matrix


This is an extension for rojoma-json to use grisu-scala to serialize JNumbers which containDoubles. To use it, simply ensure the jar is on the classpath at startup. rojoma-json will detect (via the Java service provider interface system) and use it.

The following code will verify it has been loaded properly:

import com.rojoma.json.v3.extensions.DoubleWriter
import com.rojoma.json.v3.grisu.GrisuDoubleWriter

  println("Using GrisuDoubleWriter")
  println("Not using GrisuDoubleWriter")

It is published on Maven central, so setting up SBT is as simple as

libraryDependencies += "com.rojoma" %% "rojoma-json-v3-grisu" % "1.0.0"

While for Maven, the pom snippet is:


rojoma-json-v3-grisu is published for Scala version 2.10 and 2.11.