MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / __from_json__

Method __from_json__

projects/Python/proto/protoex.py:1888–1898  ·  view source on GitHub ↗
(fields)

Source from the content-addressed store, hash-verified

1886
1887 @staticmethod
1888 def __from_json__(fields):
1889 if fields is None:
1890 return None
1891 return Account(
1892 None if "id" not in fields else fields["id"],
1893 None if "name" not in fields else fields["name"],
1894 None if "state" not in fields else StateEx.__from_json__(fields["state"]),
1895 None if "wallet" not in fields else Balance.__from_json__(fields["wallet"]),
1896 None if "asset" not in fields else Balance.__from_json__(fields["asset"]),
1897 None if "orders" not in fields else [Order.__from_json__(value) for value in fields["orders"]],
1898 )
1899
1900 # Get the FBE type
1901 @property

Callers

nothing calls this directly

Calls 2

AccountClass · 0.70
__from_json__Method · 0.45

Tested by

no test coverage detected