Understanding JSON and BSON
Learn the concepts of JSON and BSON—the data formats MongoDB uses to store and exchange information, and understand their differences and roles within MongoDB.
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. ...