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

Method to_json

example_code/item_054.py:148–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

146 return cls(**kwargs)
147
148 def to_json(self):
149 return json.dumps(self.to_dict())
150
151
152print("Example 8")

Callers 1

item_054.pyFile · 0.80

Calls 1

to_dictMethod · 0.80

Tested by

no test coverage detected