buildArray

Instantiates a new BSON array.

Example

To create the following BSON array:

[
12,
null,
{
"name": "Barry"
}
]

use the code:

buildArray {
writeInt32(12)
writeNull()
writeDocument {
writeString("name", "Barry")
}
}

Instantiates a new BSON array representing the provided instance.