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

Emit failing to serialize SQLAlchemy models #19

Closed
CatarinaPBressan opened this issue Apr 22, 2014 · 3 comments
Closed

Emit failing to serialize SQLAlchemy models #19

CatarinaPBressan opened this issue Apr 22, 2014 · 3 comments

Comments

@CatarinaPBressan
Copy link

I have a custom json_encoder setting for Flask that I use to serialize my SQLAlchemy models, and if I use flask's jsonify method my serializer works as expected.

Flask-SocketIO seems to not use my serializer, instead (IIRC) using python's own serializer.

Is there any way to change which serializer Flask-SocketIO uses?

@CatarinaPBressan CatarinaPBressan changed the title emity Emit failing to serialize SQLAlchemy models Apr 22, 2014
@CatarinaPBressan
Copy link
Author

Thanks!

@miguelgrinberg
Copy link
Owner

Please give it a try and confirm that everything works, I have not tested a custom json encoder/decoder, just made sure the ones configured in the Flask app are used.

@CatarinaPBressan
Copy link
Author

It works without any issues.

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