You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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
Types like
UUID
or custom types from libraries likesqlalchemy-utils
cannot be serialized to JSON by default from a Pythondict
, making monkey-patching the default JSONEncoder or providing a custom encoder class common practice. It would be nice to add ato_json()
method to theSerializeMixin
alongside the providedto_dict()
method, with the ability to pass in anencoder
param to the function to serialize a model to JSON.The text was updated successfully, but these errors were encountered: