Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def type_full_name(type: Any) -> str:
- return ".".join([type.__module__, type.__name__])
- def json_decode(js: str, type: Any) -> T:
- res = json.loads(js)
- res['py/object'] = type_full_name(type)
- return jsonpickle.decode(json.dumps(res))
Add Comment
Please, Sign In to add comment