MongoDB is a document-oriented database. A document is a basic unit or basic building block of data for MongoDB. Here, a document refers to a group of data in a row/record similar to a row/record in a relational database.
JSON format a widely used platform-independent data structure to exchange the data between heterogeneous systems. The JSON format is widely used nowadays by all the developers
Java to JSON conversion by using Google’s famous library Gson. There are different libraries available to convert from java object to JSON and JSON to Java Object. The 2 are the most popular first one is Google’s Gson API and the other is Jackson API.