Kotlin BSON • Multiplatform abstraction for different BSON implementations • opensavvy.ktmongo.bson • BsonDocumentReader
BsonDocumentReader¶
@LowLevelApi
interface BsonDocumentReader
Utilities for decomposing a Bson
document into its fields.
To obtain an instance of this interface, see Bson.reader
.
Example¶
Properties¶
entries
¶
abstract val entries: Map<String, BsonValueReader>
A map allowing to go through all key-value pairs in the document.
Functions¶
asValue
¶
abstract fun asValue(): BsonValueReader
Reads this entire document as a BsonValueReader
.
read
¶
abstract fun read(name: String): BsonValueReader?
Attempts to read a field named name
.
toBson
¶
Reads this document into a Bson
instance.
toString
¶
JSON representation of the document this BsonDocumentReader
is reading, as a String
.