Module: Kernel
- Defined in:
- lib/rapidjson/json_gem.rb
Instance Method Summary collapse
Instance Method Details
#JSON(object, opts = {}) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/rapidjson/json_gem.rb', line 2 def JSON(object, opts = {}) if object.respond_to? :to_s JSON.parse(object.to_s) else JSON.generate(object, opts) end end |