It's probably worth allowing custom json serializers to be easily added.
The change should be pretty simple, see
|
serialized_props = json.dumps(props, cls=JSONEncoder) |
Basically, RenderServer.render should accept a json_encoder kwarg, that defaults to the current one.
It's also probably worth explicitly exposing the default encoder as a RenderServerEncoder subclass, to make subclassing easier for downstream users.
Reactions are currently unavailable
It's probably worth allowing custom json serializers to be easily added.
The change should be pretty simple, see
python-react/react/render_server.py
Line 27 in 1bad117
Basically, RenderServer.render should accept a json_encoder kwarg, that defaults to the current one.
It's also probably worth explicitly exposing the default encoder as a RenderServerEncoder subclass, to make subclassing easier for downstream users.