Skip to content

Commit

Permalink
add ActiveSupport::JSON.decode documentation [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rodriguez committed May 28, 2012
1 parent 070fb46 commit 21fee1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activesupport/lib/active_support/json/decoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21fee1b

Please sign in to comment.