1

The release notes say:

JSON decoding now uses the multi_json gem which also vendors a json engine called OkJson. The yaml backend has been removed in favor of OkJson as a default engine for 1.8.x, while the built in 1.9.x json implementation will be used by default.

Yet when I generate a new rails 3.1 project, Gemfile has the json gem, not the multi_json or OkJson gem.

Additionally, the release notes kind of make it sound like json support is built in and doesn't need to be provided with a gem.

Also, I thought yajl-ruby was all-the-rage with the kids these days.

What does it all mean??

John Bachir
  • 22,495
  • 29
  • 154
  • 227

1 Answers1

0

Honestly, it depends on your needs. What do you need JSON support for? Rails 3 does have JSON support baked in, but you might want something better for extremely large data sets. If you are just accepting JSON-encoded post bodies or returning json data for a light-weight REST interface, then the baked in stuff will probably meet your needs.

Wizard of Ogz
  • 12,543
  • 2
  • 41
  • 43
  • thanks for the response -- it doesn't really answer my question though... i guess you are implying that if i left the json gem out, i would still have all the json functionality i know and love? – John Bachir Oct 06 '11 at 23:27
  • There's one way to find out. Remove `gem 'json'` from your Gemfile, run `bundle update` and restart your server. ;-) – Wizard of Ogz Oct 06 '11 at 23:38
  • Yes but... I don't know if I'm losing anything or what I'm losing, and I don't know why rails includes the json gem in the default bundle when rails has internal json functionality... wanna update your answer with this stuff and i'll mark it correct? – John Bachir Oct 07 '11 at 18:00