BSONdocument
BSONdocument, commonly referred to as a BSON document, is a binary-encoded serialization of JSON-like documents used primarily in MongoDB and related ecosystems. It stores data in a compact, machine-friendly format, enabling efficient storage, transmission, and in-memory processing.
A BSON document consists of a 32-bit little-endian total size field, followed by a sequence of elements.
BSON supports a rich set of data types beyond JSON, including double, string, embedded document and array,
In practice, BSONdocument is the wire format and storage format used by MongoDB drivers and servers, permitting
Compared with JSON, BSONdocument is binary and type-rich, which reduces parsing overhead and preserves type information