class method
self.encode
Ruby on Rails 3.2.22.5
Since v2.2.3Signature
self.encode(value, options = nil)
Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
Parameters
-
valuereq -
optionsopt = nil
Source
# File activesupport/lib/active_support/json/encoding.rb, line 30
def self.encode(value, options = nil)
Encoding::Encoder.new(options).encode(value)
end
Defined in activesupport/lib/active_support/json/encoding.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON