Guest User

Untitled

a guest
Mar 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. def type_full_name(type: Any) -> str:
  2. return ".".join([type.__module__, type.__name__])
  3.  
  4. def json_decode(js: str, type: Any) -> T:
  5. res = json.loads(js)
  6. res['py/object'] = type_full_name(type)
  7. return jsonpickle.decode(json.dumps(res))
Add Comment
Please, Sign In to add comment