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

#deserialise(response, options = {}) ⇒ Object



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

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

#serialise(hash, options = {}) ⇒ Object



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

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