Thanks to maintainers working on projects like oj, you can use Tidelift to give your teams access to a continuously curated stream of validated data about vetted components they need to make intelligent decisions, faster.
You can feel confident bringing oj into your application’s dependency tree because the maintainers of oj are paid by Tidelift to ensure their open source projects follow standardized secure software development practices.
Oj gem (Optimized JSON) is a fast JSON parser and Object marshaller as a Ruby gem. OJ gem is faster than the built in Ruby json gem. Oj gem achieves this by implementing the encoding and decoding of JSON in C, as a C extension to Ruby.
The approach taken by both the json gem and ActiveSupport is to push JSON encoding to the individual object and then patching those objects to implement encoding and decoding. Oj gem take a different approach and looks at Ruby objects as data and keeps the endcoding in C instead of going out to each object and encoding in Ruby. This is more of a service of function programming approach to encoding. Learn more.
oj gem is available via the RubyGems package manager.