Class: Nestful::Formats::JsonFormat
- Defined in:
- lib/nestful/formats/json_format.rb
Instance Method Summary collapse
- #decode(json) ⇒ Object
- #encode(hash, options = nil) ⇒ Object
- #extension ⇒ Object
- #mime_type ⇒ Object
Instance Method Details
#decode(json) ⇒ Object
19 20 21 |
# File 'lib/nestful/formats/json_format.rb', line 19 def decode(json) ActiveSupport::JSON.decode(json) end |
#encode(hash, options = nil) ⇒ Object
15 16 17 |
# File 'lib/nestful/formats/json_format.rb', line 15 def encode(hash, = nil) ActiveSupport::JSON.encode(hash, ) end |
#extension ⇒ Object
7 8 9 |
# File 'lib/nestful/formats/json_format.rb', line 7 def extension "json" end |
#mime_type ⇒ Object
11 12 13 |
# File 'lib/nestful/formats/json_format.rb', line 11 def mime_type "application/json" end |