diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-28 03:17:41 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-28 03:17:41 -0500 |
commit | 21fee1b6540871c0227b97f2312573a4f0d89127 (patch) | |
tree | 74a78b80a9dfb427288077c01fec8b6fddd42c6d /activesupport/lib/active_support/json/decoding.rb | |
parent | 070fb46295131da50df3048f70acfa7630267efa (diff) | |
download | rails-21fee1b6540871c0227b97f2312573a4f0d89127.tar.gz rails-21fee1b6540871c0227b97f2312573a4f0d89127.tar.bz2 rails-21fee1b6540871c0227b97f2312573a4f0d89127.zip |
add ActiveSupport::JSON.decode documentation [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/json/decoding.rb')
-rw-r--r-- | activesupport/lib/active_support/json/decoding.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index 986a764479..72fd97ceee 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -8,6 +8,11 @@ module ActiveSupport module JSON class << self + # Parses a JSON string (JavaScript Object Notation) into a hash. + # See www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} def decode(json, options ={}) data = MultiJson.load(json, options) if ActiveSupport.parse_json_times |