BSON (Binary JSON) is the binary format MongoDB uses to store documents — it extends JSON with additional data types (like dates, ObjectId, binary, and proper number types) and is efficient to store and traverse. Understanding BSON types helps you store data correctly.
BSON — binary JSON with more types
JSON has limited types (string, number, boolean, null, object, array).
BSON adds: ObjectId, Date, Binary, Decimal128, distinct Int/Long/Double, Timestamp, etc.
→ BSON is more efficient (binary, typed, traversable) and richer than plain JSON text.
