aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoding.rb
Commit message (Collapse)AuthorAgeFilesLines
* Changed the default ActiveSupport.use_standard_json_time_format from false ↵David Heinemeier Hansson2010-01-031-1/+2
| | | | | | to true and ActiveSupport.escape_html_entities_in_json from true to false to match previously announced Rails 3 defaults [DHH]
* Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]Dwayne Litzenberger2009-12-231-2/+11
| | | | | | | | | | | | | | According to RFC 4627, only the following Unicode code points are allowed unescaped in JSON: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF However, ActiveSupport::JSON did not escape the range %x00-1f. This caused parse errors when trying to decode the resulting output. [#3345 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Repair time dependenciesJeremy Kemper2009-11-141-1/+1
|
* Clarify date/time dependenciesJeremy Kemper2009-11-021-3/+0
|
* JSON.escape returns UTF-8 stringsJeremy Kemper2009-07-011-5/+7
| | | | [#2849 state:resolved]
* uses Hash#except/sliceJeremy Kemper2009-07-011-0/+2
|
* Add basic JSON serializer to AMoJoshua Peek2009-06-171-0/+5
|
* Ruby 1.9: fix json encodingJeremy Kemper2009-06-081-1/+2
|
* JSON: split encoding and coercionJeremy Kemper2009-06-081-24/+205
|
* Use __send__ for BasicObject friendlinessJeremy Kemper2009-04-261-1/+1
|
* Now that we have a separate internal rails_to_json, use a separate circular ↵Jeremy Kemper2009-04-261-6/+7
| | | | reference stack instead of sticking it in the options hash
* Only Object to_json alias is needed. Prefer nil options.Jeremy Kemper2009-04-261-1/+2
|
* Track object ids so the objects needn't respond to ==Jeremy Kemper2009-04-261-2/+2
|
* * Add pluggable JSON backends with support for the JSON gem. [rick]rick2009-04-231-1/+1
| | | | | | | | | | | | | | 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
* Simpler and clearer to just explicitly require the JSON encodersJeremy Kemper2008-11-261-9/+15
|
* Eliminate thread-local circular reference stack by passing it as an argument ↵Jeremy Kemper2008-11-231-20/+8
| | | | instead
* Add config.active_support.escape_html_entities_in_json to allow disabling of ↵Rick Olson2008-04-081-1/+0
| | | | | | html entity escaping. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_json takes :only or :except options to specific or omit certain hash ↵Jeremy Kemper2007-10-041-2/+2
| | | | | | keys. Enumerable#to_json passes through its options to each element. Closes #9751. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed JSON encoding to use quoted keys according to the JSON standard ↵David Heinemeier Hansson2007-09-301-12/+0
| | | | | | (closes #8762) [choonkat/chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Silence some warnings.Jeremy Kemper2007-05-181-2/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON ↵Sam Stephenson2007-03-181-0/+45
decoding by way of Syck with ActiveSupport::JSON.decode(json_string). Prevent hash keys that are JavaScript reserved words from being unquoted during encoding. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6443 5ecf4fe2-1ee6-0310-87b1-e25e094e27de