1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Brian Lopez
a96bf4ab5e Add yajl-ruby as a JSON parsing backend
[#2666 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-02-05 10:15:51 -08:00
Jeremy Kemper
20cdaddfd2 Ruby 1.9.2: work around changes to flatten and nil.to_str 2009-11-08 22:02:57 -08:00
Jeremy Kemper
053a0f6ac4 Clean up spurious JSON decoding test failure 2009-09-13 05:43:02 -07:00
Daniel Sheppard
b3381cacaf Fix that JSON parser fails to read escaped backslashes.
[#973 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:30:44 -07:00
Bas Van Klinkenberg
0fbeaa98e4 Fixed a bug in JSON decoding with Yaml backend, where a combination of dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception. [#2831 state:resolved]
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2009-08-08 12:44:41 -03:00
rick
e89241c92f load the JSON Backend lazily. If the JSON gem is already loaded, use the JSONGem backend by default. 2009-05-17 19:18:00 -07:00
Brian Lopez
53dda29f8b Add support for parsing XML and JSON from an IO as well as a string [#2659 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-17 10:37:52 -05:00
rick
3c4c6bd0df * Add pluggable JSON backends with support for the JSON gem. [rick]
Example: ActiveSupport::JSON.backend = "JSONGem"

  All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode().  Use of #to_json is not recommended, as it may clash with other libraries that overwrite it.  However, you can recover Rails specific functionality
  if you really want to use #to_json.

    gem 'json'
    ActiveSupport::JSON.backend = "JSONGem"

    class ActiveRecord::Base
      alias to_json rails_to_json
    end
2009-04-23 00:08:40 -07:00