The Series and AnalyzedSeries classes support serializing themselves into json, via series.as_json() calls. This is not pythonic at all. (
|
def to_json(self, rounded=True): |
)
It seems the modern best practice is to use Pydantic classes, which are like @dataclasses but better. In particular, a pydantic object can just be cast to dict(obj) or alternatively to json. https://docs.pydantic.dev/latest/concepts/serialization/
The Series and AnalyzedSeries classes support serializing themselves into json, via series.as_json() calls. This is not pythonic at all. (
otava/otava/series.py
Line 109 in 8bb5e8e
It seems the modern best practice is to use Pydantic classes, which are like @dataclasses but better. In particular, a pydantic object can just be cast to dict(obj) or alternatively to json. https://docs.pydantic.dev/latest/concepts/serialization/