Kotlin BSON • Multiplatform abstraction for different BSON implementations • opensavvy.ktmongo.bson • BsonFieldWriter • writeObjectSafe
writeObjectSafe¶
@LowLevelApi
abstract fun <T> writeObjectSafe(name: String, obj: T)
Writes an arbitrary obj
into a BSON document.
All nested values are escaped as necessary such that the result is a completely inert BSON document.