File: active_support/json/encoders/object.rb

Code

Code

   1  class Object
   2    # Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
   3    def to_json(options = nil)
   4      ActiveSupport::JSON.encode(as_json(options))
   5    end
   6 
   7    def as_json(options = nil)
   8      instance_values
   9    end
  10  end