API

By default the load method will return Ruby objects (Hashes have string keys).
The options hash respects three symbol keys

:symbolize_keys

Will return symbol keys in hashes

:raw

Will return JRuby wrapped java objects that quack like ruby objects
This is the fastest option

:use_bigdecimal

Will return BigDecimal objects instead of Float
If used with the :raw option you will get Java::JavaMath::BigDecimal objects
otherwise they are Ruby BigDecimal

JrJackson::Json.dump(obj) -> json string
aliased as generate

The dump method expects that the values of hashes or arrays are JSON data types,
the only exception to this is Ruby Symbol as values, they are converted to java strings
during serialization. NOTE: All other objects should be converted to JSON data types before
serialization. See the wiki for more on this.

Internals

There are two Ruby sub modules of the JrJackson module

JrJackson::Json, this is the general external facade used by MultiJson, and is pure Ruby.

JrJackson::Raw, this is used by the Json module, it is defined in Java with annotations
exposing it as a Ruby module with module methods.

Benchmarks

Credit to Chuck Remes for the benchmark and initial
investigation when the jruby, json gem and the jackson
libraries were young.

I compared Json (java) 1.8, Gson 0.6.1 and jackson 2.2.3 on jruby 1.7.5 and OpenJDK 64-Bit Server VM 1.7.0_25-b30
All the benchmarks were run separately. A 727.9KB string of random json data is read from a file and handled 250 times, thereby attempting to balance invocation and parsing benchmarking.