BSON (Binary JSON) is het binaire formaat dat MongoDB gebruikt om documenten op te slaan — het breidt JSON uit met aanvullende gegevenstypes (zoals datums, ObjectId, binair en juiste nummertypen) en is efficiënt om op te slaan en te doorkruisen. Het begrijpen van BSON-typen helpt je gegevens correct op te slaan.
BSON — binaire JSON met meer typen
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.
