# File lib/json/common.rb, line 327 327: def JSON(object, opts = {}) 328: if object.respond_to? :to_str 329: JSON.parse(object.to_str, opts) 330: else 331: JSON.generate(object, opts) 332: end 333: end