Skip to content

Commit

Permalink
Serialize JSON with b64 encoding/decoding for data field of LatestMit…
Browse files Browse the repository at this point in the history
…mDataEntry.py
  • Loading branch information
Grennith committed Jan 21, 2024
1 parent f760b1d commit 547f811
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ async def from_json(json_data: Union[bytes, str]) -> Optional[LatestMitmDataEntr

async def to_json(self) -> bytes:
if isinstance(self.data, bytes):
self.data = base64.b64encode(self.data)
self.data = str(base64.b64encode(self.data))
return orjson.dumps(self.__dict__)

0 comments on commit 547f811

Please sign in to comment.