instance method to_json

Ruby on Rails 3.2.22.5

Since v2.2.3 Last seen in v4.0.13

Available in: v2.2.3 v2.3.18 v3.2.22.5 v4.0.13

Signature

to_json(options = nil)

Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.

Parameters

options opt = nil
Source
# File activesupport/lib/active_support/core_ext/object/to_json.rb, line 15
    def to_json(options = nil)
      ActiveSupport::JSON.encode(self, options)
    end

Defined in activesupport/lib/active_support/core_ext/object/to_json.rb line 15 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Object

Type at least 2 characters to search.

↑↓ navigate · open · esc close