mitcheaton1 / oj

Optimized JSON

Home Page:http://www.ohler.com/oj

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

{}j gem

Build Status AppVeyor Gem Gem SemVer compatibility TideLift

A fast JSON parser and Object marshaller as a Ruby gem.

Version 3.0 is out! 3.0 provides better json gem and Rails compatibility. It also provides additional optimization options.

Using

require 'oj'

h = { 'one' => 1, 'array' => [ true, false ] }
json = Oj.dump(h)

# json =
# {
#   "one":1,
#   "array":[
#     true,
#     false
#   ]
# }

h2 = Oj.load(json)
puts "Same? #{h == h2}"
# true

Installation

gem install oj

or in Bundler:

gem 'oj'

Support

Get supported Oj with a Tidelift Subscription.

Further Reading

For more details on options, modes, advanced features, and more follow these links.

Releases

See {file:CHANGELOG.md}

Links

Follow @peterohler on Twitter for announcements and news about the Oj gem.

Performance Comparisons

Links of Interest

About

Optimized JSON

http://www.ohler.com/oj

License:MIT License


Languages

Language:C 60.9%Language:Ruby 37.8%Language:Logos 1.0%Language:Shell 0.3%