Understanding JSON and BSON
Explore the fundamentals of JSON and BSON, understanding how JSON serves as a readable data format for interaction, while BSON provides efficient binary storage in MongoDB. Learn the advantages and key distinctions that help you grasp MongoDB's data handling.
We'll cover the following...
We'll cover the following...
What is JSON?
JSON (JavaScript Object Notation) is a lightweight, human-readable data format for data exchange between applications. It is widely used in web development and APIs. Below is an example of JSON-formatted data, which we have already covered.
{"name": "Alice","age": 25,"email": "alice@example.com"}
Sample of a JSON-formatted data
Remember that it is a text-based format that uses key-value pairs. Here, name, age, and email are keys. Their values are “Alice,” “25,” and “alice@example.com,” respectively. ...