Skip to content

rjmac/rojoma-json-grisu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rojoma-json-grisu

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

if(DoubleWriter.doubleWriter.isInstanceOf[GrisuDoubleWriter])
  println("Using GrisuDoubleWriter")
else
  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:

<dependencies>
  <dependency>
    <groupId>com.rojoma</groupId>
    <artifactId>rojoma-json-v3-grisu_${scala.version}</artifactId>
    <version>1.0.0</version>
  </dependency>
</dependencies>

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

About

DoubleWriter provider that uses grisu-scala

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages