Json-smart

json-smart doc

View project on GitHub

Overview

Json-smart is a performance focused, JSON processor lib. [GettingStart Getting Start guide]

Json-smart interfaces are almost the same that json-simple, So migration from json-simple to json-smart, is very easy. Migration Guide Available

Json-smart is one of the fastest java base Json API. See bench for more details. Benchmarks

json-smart overview

  • Fast (it's at least twice faster) than the original json-simple See Benchmarks
  • Use java Generics.
  • Parser permissibility is highly customisable from permissive to strict.
  • The json generator can generate compressed json data.
  • Interfaces are the same, so json-simple projects can be easily port to json-smart.
  • It uses maven build.
  • Is available on maven central net.minidev json-smart 1.3

Lasts changes

Changelog

current stable version: 1.3.1 / 2.1.0

current V2 version is available on Maven central: net.minidev json-smart 2.2

json-smart Version 1.X 2.X
interface extanded version of json-simple new interface
serialization map, array, beans map, array, beans
de-serialization map, array map, array, beans
speed same as V 1.1, and faster on beans
usage can easily replace json-simple usage of POJO

Study case

I use this parser to process small json data stored in MySQL String records, limited to 255 chars.

In my case, every record contains simple JSon Object like: {"first":"john", "last":"Doe"} # 30 chars long

I have rewritten the generator and the parser to also support smaller json data:

{first:john,last:Doe} # 21 chars long

So, I was able to reduce the json data size by 30%

Generation of simplified json string is only supported by the full json-smart version.

Features

  • No external dependance
  • Very small 17 KB for light version 30 KB for full version
  • Posibility to read every json data FeaturesTests
  • Realy fast Benchmark
  • Required JDK 1.5

References

== Samples ==