MCPcopy
hub / github.com/mitmproxy/mitmproxy / from_json

Method from_json

mitmproxy/dns.py:55–60  ·  view source on GitHub ↗
(cls, data: dict[str, str])

Source from the content-addressed store, hash-verified

53
54 @classmethod
55 def from_json(cls, data: dict[str, str]) -> Self:
56 return cls(
57 name=data["name"],
58 type=types.from_str(data["type"]),
59 class_=classes.from_str(data["class"]),
60 )
61
62
63@dataclass

Callers 5

test_to_jsonMethod · 0.45
test_from_jsonMethod · 0.45
test_from_jsonMethod · 0.45
from_jsonMethod · 0.45
from_jsonMethod · 0.45

Calls

no outgoing calls

Tested by 3

test_to_jsonMethod · 0.36
test_from_jsonMethod · 0.36
test_from_jsonMethod · 0.36