Make serialization methods' parameter names more generic

This commit is contained in:
Bálint Bokros 2018-02-08 15:08:19 +01:00
parent 27376ada22
commit 95e1f907ee

View File

@ -13,9 +13,9 @@ def decode_if_needed(value):
return value
def serialize_all(anchor, message):
return [encode_if_needed(a) for a in (anchor, json.dumps(message))]
def serialize_all(key, data):
return [encode_if_needed(frame) for frame in (key, json.dumps(data))]
def deserialize_all(anchor, message):
return decode_if_needed(anchor), json.loads(message)
def deserialize_all(key, data):
return decode_if_needed(key), json.loads(data)