I need a library to handle JSON objects in Ruby. There are two gems available json and json_pure on http://rubygems.org/search?query=json
json_pure is written only in Ruby while json is using C. All I understand is that json is faster because of the usage of C. So is json better for production?
Both seem to be easily installed just by running gem install command. When I install Nokogiri, I need to do something extra. I thought the extra work is required because Nokogiri is using C extensions, but I don't need to do anything extra for json gem.
json and json_pure?json is easy, what's the benefit of json_pure?Nokogiri needs extra libraries because it uses libXML. json has no library dependencies, so you don't need anything extra.
The advantage of json is what you said: It is in C, so performance is better than json_pure.
The advantage of json_pure can be if you don't have MRI. For example, the json_pure gem can be installed in JRuby/Maglev or other implementations. The json gem can't be; it needs an FFI plugin to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With