Skip to content

Allow JSON serializer to be overridden #78

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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