mrevutskyi / flask-restless-ng

A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless-ng.readthedocs.io
Other
64 stars 11 forks source link

Question about custom serializers #30

Closed tanj closed 2 years ago

tanj commented 3 years ago

I noticed the docs talk about Custom Serialization but the examples were remove in 6c739545ef2221a8c5bd0fae71e67ead14eda063

Are the examples that are in the docs still the recommended way to do this or is there a new way or planned way for serialization to be done?

mrevutskyi commented 3 years ago

I've updated Custom Serialization

Instead of functions, it now uses objects (should implement Serializer class)

If you provide me more info on what you are trying to achieve with a custom serializer, I'll try to provide a better example

tanj commented 2 years ago

I took a read through the code and did see that you were using a Serializer class now, so I was able to do what I needed to by sub-classing as that was what you were doing. It was mainly that the docs didn't match the code, so I wanted to be sure I was taking the right approach.

Thanks for updating the docs :)