Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ from_json
Method
from_json
example_code/item_054.py:144–146 ·
view source on GitHub ↗
(cls, data)
Source
from the content-addressed store, hash-verified
142
class
JsonMixin:
143
@classmethod
144
def
from_json(cls, data):
145
kwargs = json.loads(data)
146
return
cls(**kwargs)
147
148
def
to_json(self):
149
return
json.dumps(self.to_dict())
Callers
1
item_054.py
File · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected