I noticed that as of rails 2.x all hash keys were intended to be
double quoted in JSON encodings. Indeed there's an ActiveSupport test
method called "test_hash_key_identifiers_are_always_quoted". I noticed
however that this isn't actually the case -- numeric keys are not
double quoted:
>> {1 => 2}.to_json
=> "{1: 2}"
Is this intentional or a bug? If all keys were double quoted this
would become:
>> {1 => 2}.to_json
=> "{\"1\": 2}"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---