diff --git a/lib/tfw/networking/serialization.py b/lib/tfw/networking/serialization.py index 7333873..73acc27 100644 --- a/lib/tfw/networking/serialization.py +++ b/lib/tfw/networking/serialization.py @@ -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)