instance method decode

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v3.0.20

Available in: v2.3.18 v3.0.20

Signature

decode(json)

Converts a JSON string into a Ruby object.

Parameters

json req
Source
# File activesupport/lib/active_support/json/backends/jsongem.rb, line 11
        def decode(json)
          data = ::JSON.parse(json)
          if ActiveSupport.parse_json_times
            convert_dates_from(data)
          else
            data
          end
        end

Defined in activesupport/lib/active_support/json/backends/jsongem.rb line 11 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::JSON::Backends::JSONGem

Type at least 2 characters to search.

↑↓ navigate · open · esc close