JSON encode/decode MIME type adapter
Decodes JSON
# File lib/http/mime_type/json.rb, line 15 def decode(str) ::JSON.load str end
Encodes object to JSON
# File lib/http/mime_type/json.rb, line 9 def encode(obj) return obj.to_json if obj.respond_to?(:to_json) ::JSON.dump obj end
Generated with the Darkfish Rdoc Generator 2.