Serializer for class 'ObjectId' is not found when pass a data object in a response in Ktor server

Hi everyone,
As described in the title, whether it is a kotlin-driver’s bug or I missed somewhere in my code?



I solved my problem. MongoDB Driver is great. You have a lot of customizations to play around with it.

How did you solve your issue ?

I overrode ObjectId field with Custom Serializers as the attached picture. You can follow document link to get full customization for other types.

1 Like

I went throught the documenrtation.
Got it Thank You.