mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-19 08:05:56 -05:00
Put packet.json back in
This commit is contained in:
parent
c0623596cd
commit
0321cb6cf1
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user