I have a float subclass with a customized str method, and its str output is appearing in the results of json5.dumps. Here's a simplified example:
>>> import json5
>>> class MyFloat(float):
... def __str__(self):
... return f"<{super().__str__()}>"
>>> print(json5.dumps(MyFloat(1)))
<1.0>
>>> json5.loads(json5.dumps(MyFloat(1))
Traceback (most recent call last):
...
ValueError: <string>:1 Unexpected "<" at column 1