FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow JSON serializer to be overridden · Issue #78 · markfinger/python-react · GitHub

Allow JSON serializer to be overridden #78

Description

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


    Back | FazBrowse Home | New Git URL