JSON and BSON Introduction | Java
37K views
Oct 24, 2024
JSON and BSON Introduction
View Video Transcript
0:00
In this video we are discussing JSON and Bison introduction
0:05
JSON is having the full form that is the JavaScript object notation and BISON is nothing but binary JSON
0:12
So, this is the Bison here. So let us discuss more about them into details
0:18
So what is JSON? So that JSON is JavaScript object notation is a format to store and interchange data
0:26
And here this format is human readable format. can read the respective data there and here this format is key value pair
0:35
So, JSON is user readable and completely language independent. So, from which language program or application you are trying to read the data from the
0:43
JSON, so that is independent, so that is a language independent. So it is lightweight and we can send information through JSON very quickly and very easily
0:53
And nowadays, JSON is getting more and more priorities for data transfer
0:59
So, here is one JSON example. So whenever you are finding this one, so this is one JSON object and here there is a, there
1:07
is a one string array and it is another JSON object is there
1:12
You can find that here we are having this underscore ID colon 100
1:17
So this underscore ID is nothing but the key and this 100 is the value
1:22
Each and every JSON document will be having one ID there. And this ID, either you give this ID
1:29
where creating this JSON document, the ID will be there. If we don't give, then system generated ID will be allocated
1:36
But one thing is very important that each and every JSON document must be having one
1:41
ID and ID should be written as underscore ID. So, this is the name, there is a key and this is the value name and this is a list of
1:49
values we are having so it has been put as a string adding. So here we are having this address So this address the value is also another JSON object So in this way you can find that how the things are taking place Now let us discuss more about this JSON document ID
2:07
So this underscore ID is a 12 byte hexadecimal number which ensures the uniqueness of each
2:14
and every document. And we can provide this underscore ID while inserting the document
2:20
So we whenever we are inserting or creating a new document, we can put our
2:24
ID accordingly. If you don't provide them, then MongoDB provides a unique ID for each and every document
2:31
from the system. So, these 12 bytes has, so now we're having this 12 bytes for this underscore ID
2:38
So how this byte is getting divided. So it is getting divided into 4 bytes plus 3 bytes, 7 bytes, plus 2 bytes, 9 bytes, plus 3 bytes
2:47
so that is the 12 bytes. So the first 4 bytes for the current timestamp, next 3 bytes for the main time
2:53
the machine ID. Next 2 bytes for process ID or MongoDB server, process ID of MongoDB server
3:02
last 3 bytes are simple incremental value. So, these are the, this is the format of this 12 bytes
3:10
Now, let us go for this BISON. So, we have told that BISON means actually binary JSON
3:17
and it is not in the human readable format. So, the BISN is a binary JavaScript
3:23
object notation and in MongoDB they use Bison to encrypt our JSON data because
3:30
it is not readable human readable so if it provides additional data types over the
3:37
JSON data and it is also language independent and easy to parse and generate
3:42
files from the machine so this is the basin that is a encrypted JSON so here in
3:49
this particular video we have discussed the JSON and the basin so we'll be using
3:53
this concept in the next videos please watch all of them and thanks for watching this
#Data Formats & Protocols
#Java (Programming Language)
#Networking
#Programming
#Software