JAVA-5934Backlog
Add contextual serializer for kotlin.date.Instant
The MongoDB Kotlin driver supports contextual serializers for the kotlinx.datetime library using the @Contextual annotation from kotlinx-serialization. Since Kotlin version 2.1 these types have moved from kotlinx-datetime to the Kotlin stdlib and are thus deprecated. It would be nice to have @Contextual support for the new stdlib classes such as kotlin.date.Instant out of the box. Workaround in the meantime: Create your custom serializer.