instance method
to_json
Ruby on Rails 4.0.13
Since v2.2.3 Last seen in v4.0.13Signature
to_json(options = nil)
Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
Parameters
-
optionsopt = 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