Need help with oj?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Global Rank
#36,581
Topics of expertise
unix-do...
rails5
sse
cluster...
ipv6
rack
Rails
graphql...
Location
none
2.7K Stars 205 Forks MIT License 1.3K Commits 8 Opened issues

Description

Optimized JSON

Services available

!
?

Need anything else?

Contributors list

# 36,581
Elixir
Crystal
Nim
Shell
660 commits
# 7,234
Ruby
Crystal
Rails
repl
21 commits
# 129,552
Ruby
sidekiq
ruby-on...
connect...
10 commits
# 10,884
React
Webpack
prerend...
Vue.js
8 commits
# 50,022
Ruby
Rails
TypeScr...
minify
8 commits
# 28,709
Ruby
Clojure
Amazon ...
Shell
5 commits
# 20,886
Ruby
Rails
yarn
windows...
4 commits
# 297,524
Rails
Shell
gem
securit...
3 commits
# 107,319
Ruby
mruby
C
Kuberne...
3 commits
# 231,828
Ruby
Shell
Rails
aws-sqs
3 commits
# 30,223
Rails
GraphQL
graphql...
chromiu...
3 commits
# 52,088
Elixir
wkhtmlt...
Erlang
Rails
3 commits
# 389,121
sudo
HTML
C
Rails
3 commits
# 3,849
Redis
python-...
python3
testing...
2 commits
# 10,499
Koa
opam
twilio
Markdow...
2 commits
# 2,078
Ruby
repl
spellin...
sed
2 commits
# 177,196
Ruby
C
Rails
Shell
2 commits
# 279,773
npm
node
HTML
qunit
2 commits
# 107,770
GitHub
notific...
Shell
Go
2 commits
# 12,116
Ruby
C
Rails
Heroku
2 commits

{}j gem

Build Status 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

  • Documentation: http://www.ohler.com/oj/doc, http://rubydoc.info/gems/oj

  • GitHub repo: https://github.com/ohler55/oj

  • RubyGems repo: https://rubygems.org/gems/oj

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

Performance Comparisons

Links of Interest

  • Fast XML parser and marshaller on RubyGems: https://rubygems.org/gems/ox

  • Fast XML parser and marshaller on GitHub: https://github.com/ohler55/ox

  • Need for Speed for an overview of how Oj::Doc was designed.

  • OjC, a C JSON parser: https://www.ohler.com/ojc also at https://github.com/ohler55/ojc

  • Agoo, a high performance Ruby web server supporting GraphQL on GitHub: https://github.com/ohler55/agoo

  • Agoo-C, a high performance C web server supporting GraphQL on GitHub: https://github.com/ohler55/agoo-c

Contributing

  • Provide a Pull Request off the
    develop
    branch.
  • Report a bug
  • Suggest an idea
  • Code is now formatted with the clang-format tool with the configuration file in the root of the repo.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.