class Object

JSON Objects

Copyright (C) 2003,2005 Rafael R. Sevilla <dido@imperium.ph>
This file is part of JSON for Ruby

JSON for Ruby is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.

JSON for Ruby is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details. 

You should have received a copy of the GNU Lesser General Public
License along with JSON for Ruby; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Author

Rafael R. Sevilla (dido@imperium.ph)

Heavily modified by Adam Kramer (adam@the-kramers.net)

Copyright

Copyright © 2003,2005 Rafael R. Sevilla

License

GNU Lesser General Public License

Public Instance Methods

to_json() click to toggle source
# File lib/json/objects.rb, line 29
def to_json #all strings in json need to have double quotes around them, treat random objects as strings
  String.to_json(to_s)
end