Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow JSON serializer to be overridden #78

Open
markfinger opened this issue Jul 6, 2017 · 1 comment
Open

Allow JSON serializer to be overridden #78

markfinger opened this issue Jul 6, 2017 · 1 comment

Comments

@markfinger
Copy link
Owner

markfinger commented Jul 6, 2017

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.

@markfinger
Copy link
Owner Author

See also: #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant