Q3: What is BSON and how does it extend standard JSON?

BSON stands for Binary JSON. It is a binary-encoded serialization format used by MongoDB to store data and execute operations. BSON extends JSON by adding support for extra data types (e.g., ObjectId, Date, BinData, Decimal128, Long) and enables faster traversal and indexing by prefixing fields with byte lengths.

Key Takeaways
  • Extends JSON with native types like Date, ObjectId, and 64-bit Int.
  • Includes length prefixes for fast traversal.
Knowledge Check

Which of the following data types is supported natively in BSON but NOT in standard JSON?