Module: Crack::JSON::Backends::JSONGem

Extended by:
JSONGem
Included in:
JSONGem
Defined in:
lib/crack/json/backends/jsongem.rb

Instance Method Summary collapse

Instance Method Details

#decode(json) ⇒ Object

Converts a JSON string into a Ruby object.



11
12
13
14
15
16
17
18
# File 'lib/crack/json/backends/jsongem.rb', line 11

def decode(json)
  data = ::JSON.parse(json)
  if Crack.parse_json_times
    convert_dates_from(data)
  else
    data
  end
end