Module: Wrest::Components::Translators::Json

Extended by:
Json
Included in:
Json
Defined in:
lib/wrest/components/translators/json.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) deserialise(response, options = {})



16
17
18
# File 'lib/wrest/components/translators/json.rb', line 16

def deserialise(response,options = {})
  ActiveSupport::JSON.decode(response.body)
end

- (Object) serialise(hash, options = {})



20
21
22
# File 'lib/wrest/components/translators/json.rb', line 20

def serialise(hash, options = {})
  hash.to_json(options)
end