Skip to main content
InterviewHubPRO
Section Overview
Q2

Question 2 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

4%
MongoDB & NoSQL (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is BSON and why does MongoDB use BSON instead of plain JSON?

junior LevelDatabases & SQL

In Simple Words: BSON is a binary serialization format for JSON-like documents:

  • Data Types: JSON only supports String, Number, Boolean, Array, Object, Null. BSON adds Date, Binary data (for hashes/images), 64-bit Integers (Long), Decimal128 (for precise financial currency), and ObjectId.
  • Traversability: BSON encodes field length prefixes, allowing MongoDB to skip over unneeded fields during query scans without parsing the entire document string.