Skip to content

ilyadh/oj

 
 

Repository files navigation

{}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. Security updates are supported.

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

Contributing

  • Provide a Pull Request off the develop branch.
  • Report a bug
  • Suggest an idea

Packages

No packages published

Languages

  • C 57.9%
  • Ruby 40.8%
  • Other 1.3%