JSON JVM

High-performance conversion to/from JSON for the JVM language engines.

License

License

Categories

Categories

JSON Data
GroupId

GroupId

com.threecrickets.jvm
ArtifactId

ArtifactId

json-jvm
Last Version

Last Version

2.0.2
Release Date

Release Date

Type

Type

pom
Description

Description

JSON JVM
High-performance conversion to/from JSON for the JVM language engines.
Project Organization

Project Organization

Three Crickets LLC
Source Code Management

Source Code Management

https://github.com/tliron/json-jvm

Download json-jvm

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

JSON JVM

A lightweight, extensible JSON encoder/decoder intended to make it easy to support JSON on non-Java languages running on the JVM.

It's extensible in two ways:

  • Easy to add support for custom types, such as native dict, list, string, number, and other implementations. This is efficient because it means you always work directly with your language's native types, without the extra step of having to translate through java.util.HashMap, java.util.ArrayList, etc.

  • Easy to add support for extended JSON formats, such as MongoDB's. For an implementation based on this library, see MongoDB JVM.

JSON JVM is very lightweight and straightforward by design. If you need a more robust solution with many more features, see Jackson.

Currently the project supports standard Java types, and JavaScript via both the Nashorn and Rhino engines.

Download

Maven:

<repository>
    <id>threecrickets</id>
    <name>Three Crickets Repository</name>
    <url>http://repository.threecrickets.com/maven/</url>
</repository>
<dependency>
    <groupId>com.threecrickets.jvm<</groupId>
    <artifactId>json-jvm</artifactId>
</dependency>

Building JSON JVM

All you need to build JSON JVM is Ant.

Then, simply change to the "/build/" directory and run "ant".

Your JDK should be at least version 8 in order to support the Nashorn implementation, although there is a workaround for earlier JDK versions (see comment in "/build/custom.properties".)

During the build process, build and distribution dependencies will be downloaded from an online repository at http://repository.threecrickets.com/, so you will need Internet access.

The result of the build will go into the "/build/distribution/" directory. Temporary files used during the build process will go into "/build/cache/", which you are free to delete.

Configuring the Build

The "/build/custom.properties" file contains configurable settings, along with some commentary on what they are used for. You are free to edit that file, however to avoid git conflicts, it would be better to create your own "/build/private.properties" instead, in which you can override any of the settings. That file will be ignored by git.

To avoid the "bootstrap class path not set" warning during compilation (harmless), configure the "compile.boot" setting in "private.properties" to the location of an "rt.jar" file belonging to JVM version 7.

Deploying to Maven

You do not need Maven to build JSON JVM, however you can deploy your build to a Maven repository using the "deploy-maven" Ant target. To enable this, you must install Maven and configure its path in "private.properties".

Still Having Trouble?

Join the Prudence Community, and tell us where you're stuck! We're very happy to help newcomers get up and running.

Versions

Version
2.0.2