14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/ruby-common/v5/StructUnpacker.rb', line 14
def self.parse_payload(decrypted_payload)
= decrypted_payload.to_s[0]
case
when SERIALIZE_HEADER, "Serialize", "serialize"
return serialize_unpack(decrypted_payload)
when MSG_HEADER, "Msgpack", "msgpack"
return msg_unpack(decrypted_payload)
when JSON_HEADER, "StructJson", "json"
return json_unpack(decrypted_payload)
when RFC3986_HEADER, "StructRfc3986", "rfc3986"
return rfc3986_unpack(decrypted_payload)
else
raise StructParseError, "Unsupported struct class #{}"
end
end
|