From 21fee1b6540871c0227b97f2312573a4f0d89127 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 28 May 2012 03:17:41 -0500 Subject: add ActiveSupport::JSON.decode documentation [ci skip] --- activesupport/lib/active_support/json/decoding.rb | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3