instance method
to_json
Ruby on Rails 2.3.18
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/json/encoders/object.rb, line 3
def to_json(options = nil)
ActiveSupport::JSON.encode(as_json(options))
end
Defined in activesupport/lib/active_support/json/encoders/object.rb line 3
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Object