After more than a month Oj 3.0.0 is out. This is a
major release focussed on json gem and Rails
compatibility. Oj is now fully compatible mode with
the json gem in ruby 2.4 and fully compatible with
Rails 5.0. A new :custom mode was added as well.
Json gem: Oj
is now a drop in replacement for the standard Ruby
json gem. Just set Oj to mimic JSON and it passes
all the json gem unit tests for Ruby 2.4. Older
versions of Ruby will differ as the json gem changes
from one release to another. Oj also offers some
optimized versions of common classes such as Hash,
Array, Time, BigDecimal and more.
Rails: Oj
Rails mode passes all the ActiveSupport 5.0 encoding
and decoding unit tests making it a drop in
replacement. Options are included to use an
optimized version of to_json and as_json methods on
a class by class basis with further optimizations
coming in the future.
Please give stereobooster a thank you for getting the tests set up and
helping out with json gem and Rails understanding. He also has some
benchmarks of Oj versus other options at
https://github.com/stereobooster/ruby-json-benchmark.
|