aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoding.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-30 20:57:50 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-30 20:57:50 +0000
commit7275d2749cb829d89bffe7e6aa87c99084351f6a (patch)
treeea1ffa76f30699cb84827bf6d21dbdb6d1201c1e /activesupport/lib/active_support/json/encoding.rb
parent66d05f5e2c7ac6b18220956fbcf34efcd32638fc (diff)
downloadrails-7275d2749cb829d89bffe7e6aa87c99084351f6a.tar.gz
rails-7275d2749cb829d89bffe7e6aa87c99084351f6a.tar.bz2
rails-7275d2749cb829d89bffe7e6aa87c99084351f6a.zip
Fixed JSON encoding to use quoted keys according to the JSON standard (closes #8762) [choonkat/chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/json/encoding.rb')
-rw-r--r--activesupport/lib/active_support/json/encoding.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb
index 64e5779b71..67656109c0 100644
--- a/activesupport/lib/active_support/json/encoding.rb
+++ b/activesupport/lib/active_support/json/encoding.rb
@@ -10,13 +10,6 @@ end
module ActiveSupport
module JSON
- # When +true+, Hash#to_json will omit quoting string or symbol keys
- # if the keys are valid JavaScript identifiers. Note that this is
- # technically improper JSON (all object keys must be quoted), so if
- # you need strict JSON compliance, set this option to +false+.
- mattr_accessor :unquote_hash_key_identifiers
- @@unquote_hash_key_identifiers = true
-
class CircularReferenceError < StandardError
end
@@ -30,11 +23,6 @@ module ActiveSupport
end
end
- def can_unquote_identifier?(key) #:nodoc:
- unquote_hash_key_identifiers &&
- ActiveSupport::JSON.valid_identifier?(key)
- end
-
protected
def raise_on_circular_reference(value) #:nodoc:
stack = Thread.current[REFERENCE_STACK_VARIABLE] ||= []