BsonArrayReader
Utilities for decomposing a BsonArray into its elements.
To obtain an instance of this interface, see BsonArray.reader.
Example
val bson: BsonArray = …
for ((index, field) in bson.read().elements.withIndex()) {
println("[$index] • ${field.type}")
}Content copied to clipboard
Implementation constraints
Different implementations of BsonArrayReader should be considered equal if they have the same elements in the same order. The methods BsonArrayReader.Companion.equals and BsonArrayReader.Companion.hashCode are provided to facilitate implementation.
Functions
Link copied to clipboard
Reads this entire array as a BsonValueReader.
Link copied to clipboard
Analyzes the difference between two BSON arrays.
Link copied to clipboard
JSON representation of the array this BsonArrayReader is reading, as a String.