activesupport/lib/active_support/json/decoding.rb
# Parses a JSON string (JavaScript Object Notation) into a hash.
# See http://www.json.org for more info.
#
#   ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}")
#   => {"team" => "rails", "players" => "36"}
Parses a JSON string (JavaScript Object Notation) into a hash.


Parses a JSON string ( JavaScript Object Notation ) into a hash .
def convert_dates_from(data)
        case data
        when nil
          nil
        when DATE_REGEX
          begin
            DateTime.parse(data)
          rescue ArgumentError
            data
          end
        when Array
          data.map! { |d| convert_dates_from(d) }
        when Hash
          data.each do |key, value|
            data[key] = convert_dates_from(value)
          end
        else
          data
        end
      end
def convert_dates_from ( data ) case data when nil nil when DATE_REGEX begin DateTime . parse ( data ) rescue ArgumentError data end when Array data . map! { | d | convert_dates_from ( d ) } when Hash data . each do | key , value | data [ key ] = convert_dates_from ( value ) end else data end end
Parses a JSON string (JavaScript Object Notation) into a hash.
Parses a JSON string ( JavaScript Object Notation ) into a hash .
data
<not_specific>