Skip to content

Allow JSON serializer to be overridden #78

@markfinger

Description

@markfinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions