2007-12-21 08:48:59 +01:00
|
|
|
class Object
|
2008-05-18 06:22:34 +02:00
|
|
|
# Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
|
2009-08-04 17:16:03 +02:00
|
|
|
def to_json(options = nil)
|
|
|
|
ActiveSupport::JSON.encode(as_json(options))
|
|
|
|
end
|
|
|
|
|
|
|
|
def as_json(options = nil)
|
|
|
|
instance_values
|
2007-12-21 08:48:59 +01:00
|
|
|
end
|
|
|
|
end
|