instance method as_json

Ruby on Rails 3.1.12

Since v3.0.20 Last seen in v4.0.13

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

as_json(value)

like encode, but only calls as_json, without encoding to string

Parameters

value req
Source
# File activesupport/lib/active_support/json/encoding.rb, line 53
        def as_json(value)
          check_for_circular_references(value) do
            value.as_json(options_for(value))
          end
        end

Defined in activesupport/lib/active_support/json/encoding.rb line 53 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::JSON::Encoding::Encoder

Type at least 2 characters to search.

↑↓ navigate · open · esc close