Class: Nestful::Formats::JSONFormat
- Defined in:
- lib/nestful/formats/json_format.rb
Instance Method Summary collapse
Instance Method Details
#decode(json) ⇒ Object
18 19 20 |
# File 'lib/nestful/formats/json_format.rb', line 18 def decode(json) JSON.parse(json) end |
#encode(hash, options = nil) ⇒ Object
14 15 16 |
# File 'lib/nestful/formats/json_format.rb', line 14 def encode(hash, = nil) hash.to_json() end |
#mime_type ⇒ Object
10 11 12 |
# File 'lib/nestful/formats/json_format.rb', line 10 def mime_type 'application/json' end |