Hacker News new | ask | show | jobs
Yajl-ruby 0.5.5, now with a JSON gem compatibility API
8 points by brianmario 6209 days ago
http://github.com/brianmario/yajl-ruby

The new JSON gem compatibility API is meant as a drop-in replacement for the JSON gem in your projects.

Simply replace "require 'json'" with "require 'yajl/json_gem'" and you're set!

yajl-ruby offers a more efficient, better RFC compliance and Unicode support over the JSON gem. I highly recommend anyone using the JSON gem to check it out.

1 comments

That looks excellent. Can't wait for Rails 3 with the new JSON support structure.
How does Rails 3 improve the JSON support structure?
It introduces plug-able JSON back-ends, like the plug-able XML back-ends that exist today. It ships with JSON back-ends for the existing YAML implementation and the JSON gem. In addition to that all of the plug-able back-ends (XML and JSON) support parsing from an IO as well as a string now.

technoweenie has written a Rails plugin adding yajl-ruby as a back-end at: http://github.com/technoweenie/yajl-rails/tree/master

I also have a fork that I'll keep up today with the latest API changes in yajl-ruby at: http://github.com/brianmario/yajl-rails