Browse files

add ActiveSupport::JSON.decode documentation [ci skip]

  • Loading branch information...
1 parent 070fb46 commit 21fee1b6540871c0227b97f2312573a4f0d89127 Francesco Rodriguez committed May 28, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 activesupport/lib/active_support/json/decoding.rb
View
5 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

0 comments on commit 21fee1b

Please sign in to comment.