Sha256: 7f8a4dfc2fcfc86feedaabbbe73d9d6a922d8070e7f677f64ba19802fa0a49a5
Contents?: true
Size: 528 Bytes
Versions: 9
Compression:
Stored size: 528 Bytes
Contents
require 'json' module Hoth module Encoding class Json class <<self def encode(object) object.to_json end def decode(string) begin Hoth::Logger.debug "Original params before decode: #{string.inspect}" JSON.parse(string) rescue JSON::ParserError => jpe raise EncodingError.wrap(jpe) end end def content_type "application/json" end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems