Skip to content

admariner/oj

Repository files navigation

{}j gem

Build Status Gem Gem

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.

Please check out issue #364 and help pick or suggest a image to represent Oj.

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'

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

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 64.8%
  • Ruby 34.1%
  • Other 1.1%