mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 02:21:57 +00:00
Make serialization methods' parameter names more generic
This commit is contained in:
parent
27376ada22
commit
95e1f907ee
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user