BsonDocumentReader
Utilities for decomposing a Bson document into its fields.
To obtain an instance of this interface, see Bson.reader.
Example
val bson: Bson = …
for ((name, field) in bson.read().entries) {
println("Field: $name • ${field.type}")
}Content copied to clipboard
Implementation constraints
Different implementations of BsonDocumentReader should be considered equal if they have the same fields which each have the same values. The methods BsonDocumentReader.Companion.equals and BsonDocumentReader.Companion.hashCode are provided to facilitate implementation.
Properties
Functions
Link copied to clipboard
Reads this entire document as a BsonValueReader.
Link copied to clipboard
Analyzes the difference between two BSON documents.
Link copied to clipboard
JSON representation of the document this BsonDocumentReader is reading, as a String.