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

4 commits

Author SHA1 Message Date
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