dunglas/doctrine-json-odm

[Question] How can I add own serializers / normalizers?

timonf opened this issue · 2 comments

Hi!

How can I add custom normalizers into it? I discovered the bundle have an own instance of Symfony's serializer component, or am I wrong?

Best regards
Timon

Indeed, you can override the dunglas_doctrine_json_odm.serializer service in your config/services.yaml file to register your own serializer: https://github.com/dunglas/doctrine-json-odm/blob/master/src/Bundle/Resources/config/services.xml#L14-L17

It would be nice to add a doc entry about that.