class method
self.encode
Ruby on Rails 2.2.3
Since v2.2.3Signature
self.encode(value, options = {})
Converts a Ruby object into a JSON string.
Parameters
-
valuereq -
optionsopt = {}
Source
# File activesupport/lib/active_support/json/encoding.rb, line 19
def encode(value, options = {})
raise_on_circular_reference(value) do
value.send(:to_json, options)
end
end
Defined in activesupport/lib/active_support/json/encoding.rb line 19
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON