leejarvis/gridhook — pull request #4 by stereoscott (2013-09-20 04:46:10+00:00)
Title: Use MultiJson for compatibility with other JSON libraries

I understand if you do not want to accept this pull request, but `MultiJson` allows developers to choose their own JSON parser ([adopted by rails, too](https://github.com/rails/rails/pull/289)). I wouldn't have minded using `yajl-ruby`, but I ran into a very obscure error where `yajl` would throw an exception when trying to parse a nil value. This was happening when using a serializer in an ActiveRecord model:

```ruby
class ContactImport < ActiveRecord::Base
belongs_to :user
serialize :contacts, JSON
#...
```

When initializing a new instance of that model, yajl throws an error every time: `input must be a string or IO`. Anyway, in order to revert back to our old JSON parser, I had to remove yajl-ruby, and the only way to do that was to update this gem with an alternative library.

Hope you'll consider it! Thanks for sharing this with the community.