Converts the question into json for mitmweb. Sync with web/src/flow.ts.
(self)
| 41 | return self.name |
| 42 | |
| 43 | def to_json(self) -> dict: |
| 44 | """ |
| 45 | Converts the question into json for mitmweb. |
| 46 | Sync with web/src/flow.ts. |
| 47 | """ |
| 48 | return { |
| 49 | "name": self.name, |
| 50 | "type": types.to_str(self.type), |
| 51 | "class": classes.to_str(self.class_), |
| 52 | } |
| 53 | |
| 54 | @classmethod |
| 55 | def from_json(cls, data: dict[str, str]) -> Self: |
no outgoing calls