Using json gem's encode instead of Rails'

I'm interested in a JSONgem version of encode as well. I ran in to this issue:

https://rails.lighthouseapp.com/projects/8994/tickets/3345-to_json-does-not-escape-unicode-characters

which was only recently fixed. I would rather use the json gem than wait for Rails to find all the bugs and improve the speed of the home-grown json implementation.

Any help?

Greg Hazel wrote:

I'm interested in a JSONgem version of encode as well. I ran in to this issue:

#3345 to_json does not escape unicode characters - Ruby on Rails - rails

which was only recently fixed. I would rather use the json gem than wait for Rails to find all the bugs and improve the speed of the home-grown json implementation.

Any help?

I circumvented the Rails hack by making a hack of my own.

Hopefully, the Rails core team does not create more hacks of this nature. Better yet, the hack should be removed. I want to choose which version of to_json I use (instead of some Rails core dude).