Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 25817

Oj

$
0
0

Oj (Optimized JSON) is fast. Faster than the build in Ruby json gem and faster even than Msgpack in most cases and yet in human readable JSON. Oj 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 monkey patching those objects to implement encoding and decoding. Oj 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. The results are clear. Enjoy Oj!

StarWatchVote on Hacker NewsDocumentation


Viewing all articles
Browse latest Browse all 25817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>