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

Feature request: SerializeMixin - Add to_json() with support for custom JSON encoding #46

Open
lararosekelley opened this issue Sep 19, 2020 · 1 comment

Comments

@lararosekelley
Copy link

Types like UUID or custom types from libraries like sqlalchemy-utils cannot be serialized to JSON by default from a Python dict, making monkey-patching the default JSONEncoder or providing a custom encoder class common practice. It would be nice to add a to_json() method to the SerializeMixin alongside the provided to_dict() method, with the ability to pass in an encoder param to the function to serialize a model to JSON.

@PrasanthChettri
Copy link
Contributor

PrasanthChettri commented Apr 1, 2021

@michaelbukachi I would like to work on this issue, the thing is idk how to do this, if anyone can give me a broad overview of how to implement something like this, that would be nice

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

2 participants