Put packet.json back in

This commit is contained in:
Hemna 2024-03-23 21:06:20 -04:00
parent c0623596cd
commit 0321cb6cf1
1 changed files with 8 additions and 0 deletions

View File

@ -109,6 +109,14 @@ class Packet:
path: List[str] = field(default_factory=list, compare=False, hash=False)
via: Optional[str] = field(default=None, compare=False, hash=False)
@property
def json(self):
"""get the json formated string.
This is used soley by the rpc server to return json over the wire.
"""
return self.to_json()
def get(self, key: str, default: Optional[str] = None):
"""Emulate a getter on a dict."""
if hasattr(self, key):