MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / deserialize

Function deserialize

example_code/item_063.py:127–131  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

125 REGISTRY[target_class.__name__] = target_class
126
127def deserialize(data):
128 params = json.loads(data)
129 name = params["class"]
130 target_class = REGISTRY[name]
131 return target_class(*params["args"])
132
133
134print("Example 7")

Callers 1

item_063.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected