Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,370 --> 00:00:07,440
Welcome to Jeremyās IT Lab. This is a free,\n
2
00:00:07,440 --> 00:00:12,380
these videos, please subscribe to follow along\n
3
00:00:12,380 --> 00:00:17,130
a comment, and share the video to help spread\n
4
00:00:17,129 --> 00:00:24,149
help. In this video we will look at JSON,\n
5
00:00:24,149 --> 00:00:29,359
languages, or data serialization formats.\n
6
00:00:29,359 --> 00:00:35,850
in a standardized way so it can be communicated\n
7
00:00:35,850 --> 00:00:41,689
topic 6.7, which says you must be able to\n
8
00:00:41,689 --> 00:00:48,838
only mentions JSON, not XML or YAML. So, the\n
9
00:00:48,838 --> 00:00:53,899
but at the end I will take a bit of time to\n
10
00:00:55,729 --> 00:01:01,978
Hereās what weāll cover in this video.\n
11
00:01:01,978 --> 00:01:07,969
and why we need it. Then Iāll cover JSON.\n
12
00:01:07,969 --> 00:01:13,659
and weāll focus on how to interpret basic\n
13
00:01:13,659 --> 00:01:19,820
XML and YAML, so you can compare and contrast\n
14
00:01:19,820 --> 00:01:25,219
much time on those two, since theyāre not\n
15
00:01:25,219 --> 00:01:29,730
sure to watch until the end of the video for\n
16
00:01:29,730 --> 00:01:33,090
ExSim, the best practice exams for the CCNA.
17
00:01:33,090 --> 00:01:40,480
So, letās take a look at what data serialization\n
18
00:01:40,480 --> 00:01:46,990
a standardized format, or structure, that\n
19
00:01:46,989 --> 00:01:53,379
for example over a network, and then be reconstructed\n
20
00:01:53,379 --> 00:01:58,629
Why is that useful? It allows the data to\n
21
00:01:58,629 --> 00:02:04,379
way both applications can understand. If one\n
22
00:02:04,379 --> 00:02:09,490
other is written in Java, both languages store\n
23
00:02:09,490 --> 00:02:16,489
format to send data between each other. Data\n
24
00:02:16,489 --> 00:02:22,539
allow us to represent variables with text.\n
25
00:02:22,539 --> 00:02:34,120
of variables. Interface name, gigabitethernet1/1.\n
26
00:02:34,120 --> 00:02:41,329
255.255.255.0. These are four variables. Basically,\n
27
00:02:41,329 --> 00:02:47,560
For example āinterface_nameā is a container,\n
28
00:02:47,560 --> 00:02:53,000
inside of it. āStatusā is another container,\n
29
00:02:53,000 --> 00:02:58,120
letās see how data exchanges would work\n
30
00:02:58,120 --> 00:03:04,278
format. The client, for example an app trying\n
31
00:03:04,278 --> 00:03:10,498
sends a GET message. The server, the controller,\n
32
00:03:10,498 --> 00:03:15,710
without converting them to a standard format\n
33
00:03:15,710 --> 00:03:20,748
the data it received. The app and the controller\n
34
00:03:20,748 --> 00:03:24,278
and they store data differently, they canāt\n
35
00:03:24,278 --> 00:03:31,169
So letās see how a data serialization language\n
36
00:03:31,169 --> 00:03:36,719
a GET request. The requested variables are\n
37
00:03:36,719 --> 00:03:42,859
standard format, JSON, and sends them over\n
38
00:03:42,859 --> 00:03:47,730
are in a standard format that both the client\n
39
00:03:47,729 --> 00:03:53,408
to take those variables and convert them into\n
40
00:03:53,408 --> 00:03:58,798
at any details about how APIs work yet, I\n
41
00:03:58,799 --> 00:04:02,968
process might not be totally clear for you\n
42
00:04:02,968 --> 00:04:07,530
of having a standard data format like JSON\n
43
00:04:10,628 --> 00:04:16,769
Now letās take a look at JSON. JSON, which\n
44
00:04:16,769 --> 00:04:22,180
an open standard file format and data interchange\n
45
00:04:22,180 --> 00:04:27,949
as files or to send data over a network, that\n
46
00:04:27,949 --> 00:04:33,840
data objects. So, although itās used to\n
47
00:04:33,839 --> 00:04:38,679
be easily machine-readable of course, itās\n
48
00:04:38,680 --> 00:04:45,500
us to read and understand. It is standardized\n
49
00:04:45,500 --> 00:04:52,841
URL. Or just do a google search for RFC 8259.\n
50
00:04:52,841 --> 00:04:57,550
youāre not used to reading technical documentation\n
51
00:04:57,550 --> 00:05:03,400
at first, but itās the best source to really\n
52
00:05:03,399 --> 00:05:08,049
from JavaScript, but it is language-independent\n
53
00:05:08,050 --> 00:05:14,199
able to generate and read JSON data. Note\n
54
00:05:14,199 --> 00:05:21,240
Cisco expects you to learn the basics of JSON\n
55
00:05:21,240 --> 00:05:27,030
insignificant. What does that mean? Well,\n
56
00:05:27,029 --> 00:05:31,429
basically it means that spaces and linebreaks\n
57
00:05:31,430 --> 00:05:37,959
of the data. In JSON, there are four primitive\n
58
00:05:37,959 --> 00:05:43,529
them, but they are string, number, boolean,\n
59
00:05:43,529 --> 00:05:49,918
data types, object and array. Letās look\n
60
00:05:53,189 --> 00:05:58,579
First up, the primitive data types. A string\n
61
00:05:58,579 --> 00:06:04,878
quotes. Here are some examples of strings.\n
62
00:06:04,879 --> 00:06:11,039
quotes. This means it is a string, a series\n
63
00:06:11,038 --> 00:06:16,389
also strings. So, remember that if itās\n
64
00:06:16,389 --> 00:06:23,538
a simple text value. Next, a number is simply\n
65
00:06:23,538 --> 00:06:29,978
So, 5, 100, or any other number. Note that\n
66
00:06:29,978 --> 00:06:35,240
quotes is a string, a text value, but the\n
67
00:06:35,240 --> 00:06:42,240
a numeric value. They are different data types.\n
68
00:06:42,240 --> 00:06:49,340
two possible values. Those are true and false.\n
69
00:06:49,339 --> 00:06:55,399
In a networking setting, perhaps on an OSPF-enabled\n
70
00:06:55,399 --> 00:07:00,569
have the boolean value ātrueā if the interface\n
71
00:07:00,569 --> 00:07:05,449
the variable would have the boolean value\n
72
00:07:05,449 --> 00:07:11,069
how boolean values could be used. Note that\n
73
00:07:11,069 --> 00:07:15,509
with double quotes. That isnāt a boolean\n
74
00:07:15,509 --> 00:07:21,330
a series of letters. However when written\n
75
00:07:21,329 --> 00:07:28,589
Finally, note that they are written all lower-case,\n
76
00:07:28,589 --> 00:07:33,569
The final primitive data type is null, which\n
77
00:07:33,569 --> 00:07:40,538
object value. Itās simply written as null,\n
78
00:07:40,538 --> 00:07:46,199
means there is no value, it means nothing.\n
79
00:07:46,199 --> 00:07:51,330
in double quotes. That is a string, because\n
80
00:07:51,329 --> 00:07:56,188
not express a null value, it just means the\n
81
00:07:56,189 --> 00:08:01,349
primitive JSON data types. String, number,\nboolean, and null.
82
00:08:01,348 --> 00:08:08,529
Now letās go on to the structured data types,\n
83
00:08:08,529 --> 00:08:14,529
list of key-value pairs, basically variables.\n
84
00:08:14,529 --> 00:08:20,869
doesnāt matter. Objects are surrounded by\n
85
00:08:20,870 --> 00:08:27,598
the name of the variable, the container, must\n
86
00:08:27,598 --> 00:08:33,218
Then the value inside of that variable can\n
87
00:08:33,219 --> 00:08:40,260
boolean, null, object, or array. The key and\n
88
00:08:40,259 --> 00:08:45,039
there are multiple key-value pairs in the\n
89
00:08:45,039 --> 00:08:52,309
Okay, letās look at some examples to help\n
90
00:08:52,309 --> 00:08:56,990
Note the curly bracket at the top indicating\n
91
00:08:56,990 --> 00:09:03,429
closing it at the bottom. Inside there are\n
92
00:09:03,429 --> 00:09:09,669
object in more detail, I want to show you\n
93
00:09:09,669 --> 00:09:15,969
said before, in JSON whitespace is insignificant,\n
94
00:09:15,970 --> 00:09:21,839
one on the left is easier to read, but computers\n
95
00:09:21,839 --> 00:09:29,110
So, Iāve colored the keys blue and the values\n
96
00:09:29,110 --> 00:09:34,909
look at the data type of each individual key\n
97
00:09:34,909 --> 00:09:40,500
in double quotes, thatās the key. Then notice\n
98
00:09:40,500 --> 00:09:46,269
which is āgigabitethernet1/1ā in double\n
99
00:09:46,269 --> 00:09:51,379
they both have double quotes. Remember that\n
100
00:09:51,379 --> 00:09:57,189
be any valid JSON data type. Notice that there\n
101
00:09:57,190 --> 00:10:03,279
are multiple key-value pairs in an object,\n
102
00:10:03,278 --> 00:10:09,299
the next key-value pair under it the key is\n
103
00:10:09,299 --> 00:10:13,809
the colon between the key āis_upā and\n
104
00:10:13,809 --> 00:10:20,409
double quotes. That is a boolean. This probably\n
105
00:10:20,409 --> 00:10:25,948
because of the value true for the key āis_upā.\n
106
00:10:25,948 --> 00:10:31,838
pair, because there is another key-value pair\n
107
00:10:31,839 --> 00:10:36,529
values are both strings, because they are\n
108
00:10:36,528 --> 00:10:41,379
standard JSON formatting again. The key is\n
109
00:10:41,379 --> 00:10:47,338
the key and value, and there is a comma after\n
110
00:10:47,339 --> 00:10:54,240
final pair. What data type is the value 1000?\n
111
00:10:54,240 --> 00:10:59,940
in double quotes. And notice that this time\n
112
00:10:59,940 --> 00:11:05,370
because itās the last key-value pair in\n
113
00:11:05,370 --> 00:11:08,570
object with multiple key-value pairs inside.
114
00:11:08,570 --> 00:11:14,399
Now, as you can see in the following example,\n
115
00:11:14,399 --> 00:11:19,681
of a key-value pair. Iāve colored the curly\n
116
00:11:19,681 --> 00:11:25,250
I want you to pause the video to try to interpret\n
117
00:11:25,250 --> 00:11:30,220
important that you get comfortable reading\n
118
00:11:30,220 --> 00:11:36,610
in the CCNA exam. Okay, so this example is\n
119
00:11:36,610 --> 00:11:42,220
brackets at the top and bottom. Inside of\n
120
00:11:42,220 --> 00:11:49,190
Hereās one key-value pair. The key is ādeviceā,\n
121
00:11:49,190 --> 00:11:55,290
indicated by the blue curly brackets. So,\n
122
00:11:55,289 --> 00:12:01,269
that objects within objects are called ānested\n
123
00:12:01,269 --> 00:12:07,419
there are multiple key-value pairs. ānameā:āR1ā\n
124
00:12:07,419 --> 00:12:13,799
is a key-value pair, and āmodelā:ā1101ā\n
125
00:12:13,799 --> 00:12:19,199
one more key-value pair, and again the value\n
126
00:12:19,200 --> 00:12:24,850
brackets. And inside of that object there\n
127
00:12:24,850 --> 00:12:30,269
this fairly easy to read by using indenting\n
128
00:12:30,269 --> 00:12:35,838
but keep in mind that JSON data wonāt always\n
129
00:12:35,839 --> 00:12:40,519
and only used to make it easier for us to\n
130
00:12:42,750 --> 00:12:49,528
Okay, now there is one more JSON structured\n
131
00:12:49,528 --> 00:12:55,689
An array is a series of values separated by\n
132
00:12:55,690 --> 00:13:01,480
pairs, thatās an object. Itās just a series\n
133
00:13:01,480 --> 00:13:06,269
have to be the same data type. One could be\n
134
00:13:06,269 --> 00:13:13,250
So, here Iāve got one JSON object with two\n
135
00:13:13,250 --> 00:13:19,370
arrays. The first array, the value of the\n
136
00:13:19,370 --> 00:13:25,709
names, with a comma between each of them.\n
137
00:13:25,708 --> 00:13:30,869
because itās the last value. And then the\n
138
00:13:30,870 --> 00:13:37,019
5. Note that āHiā is a string and 5 is\n
139
00:13:37,019 --> 00:13:41,929
So, as you can see the values donāt necessarily\n
140
00:13:41,929 --> 00:13:47,208
will be. If you need to, pause the video now\n
141
00:13:47,208 --> 00:13:52,789
understand it, as well as the previous examples.\n
142
00:13:52,789 --> 00:13:57,990
help you interpret it if you donāt practice\n
143
00:13:59,589 --> 00:14:04,660
For reference, here is the output of SHOW\n
144
00:14:04,659 --> 00:14:11,049
output in JSON. Note that this isnāt actual\n
145
00:14:11,049 --> 00:14:16,519
this JSON data myself. The point is that,\n
146
00:14:16,519 --> 00:14:20,899
easy for us humans to read, they arenāt\n
147
00:14:20,899 --> 00:14:26,828
understand. JSON, on the other hand, is very\n
148
00:14:26,828 --> 00:14:32,120
format the text properly like this itās\n
149
00:14:32,120 --> 00:14:37,210
the video if you want to compare this SHOW\n
150
00:14:37,210 --> 00:14:42,420
Okay, so weāve looked at all of the six\n
151
00:14:42,419 --> 00:14:49,059
data types: string, number, boolean, and null,\n
152
00:14:49,059 --> 00:14:55,500
array. One more point, note that an object\n
153
00:14:55,500 --> 00:15:00,589
just a different name, but you should be aware\n
154
00:15:00,589 --> 00:15:05,870
Weāll take a quick look at XML and YAML,\n
155
00:15:05,870 --> 00:15:09,039
get lots of practice interpreting JSON data.
156
00:15:09,039 --> 00:15:17,659
So, hereās XML. XML was developed as a markup\n
157
00:15:17,659 --> 00:15:21,889
serialization language. You know what a data\n
158
00:15:21,889 --> 00:15:27,990
markup language? Markup languages are used\n
159
00:15:27,990 --> 00:15:34,649
probably heard of, is a markup language. XML\n
160
00:15:34,649 --> 00:15:40,399
although itās not so difficult to read.\n
161
00:15:40,399 --> 00:15:45,240
youāll often see it displayed with spaces\n
162
00:15:45,240 --> 00:15:52,100
XML is also often used by REST APIs, same\n
163
00:15:52,100 --> 00:15:58,699
is this: the key is tagged like this, with\n
164
00:15:58,698 --> 00:16:04,578
IOS you can use a SHOW command, pipe the command\n
165
00:16:04,578 --> 00:16:12,519
it in XML. I used SHOW IP INTERFACE BRIEF,\n
166
00:16:12,519 --> 00:16:17,200
format. Iāve colored the output to make\n
167
00:16:17,200 --> 00:16:24,480
see the keys and values. We have two interfaces,\n
168
00:16:24,480 --> 00:16:30,920
we have Interface, IP-address, OK, Method,\n
169
00:16:30,919 --> 00:16:35,959
in the middle of those keys. For example,\n
170
00:16:35,960 --> 00:16:43,410
of GigabitEthernet0/0, and then a forward\n
171
00:16:43,409 --> 00:16:48,679
And here you can compare the regular SHOW\n
172
00:16:48,679 --> 00:16:54,059
output, without any coloring in the XML this\n
173
00:16:54,059 --> 00:16:58,828
human-readable than JSON, but itās still\n
174
00:16:58,828 --> 00:17:04,250
So, thatās all Iāll say about XML. If\n
175
00:17:04,250 --> 00:17:11,009
similar. Remember basic characteristics like\n
176
00:17:11,009 --> 00:17:17,279
tags, remember that whitespace is insignificant,\n
177
00:17:17,279 --> 00:17:22,490
also used by REST APIs. If you want to take\n
178
00:17:25,419 --> 00:17:32,420
Finally, letās take a brief look at YAML.\n
179
00:17:32,420 --> 00:17:37,840
Markup Language, but to distinguish its purpose\n
180
00:17:37,839 --> 00:17:44,039
a markup language, it was repurposed to YAML\n
181
00:17:44,039 --> 00:17:50,029
recursive acronym by the way, when the acronym\n
182
00:17:50,029 --> 00:17:55,089
by the network automation tool Ansible, which\n
183
00:17:55,089 --> 00:17:59,990
sorts of other uses too, of course, but its\n
184
00:17:59,990 --> 00:18:07,429
topic, network automation. YAML is very human-readable,\n
185
00:18:07,429 --> 00:18:13,250
and XML. So, indentation is very important.\n
186
00:18:13,250 --> 00:18:20,179
we want. YAML files start with three hyphens,\n
187
00:18:20,179 --> 00:18:27,009
Key value pairs are represented as key colon\n
188
00:18:27,009 --> 00:18:32,711
but Iāll leave it there. Hereās an example\n
189
00:18:32,711 --> 00:18:40,690
BRIEF data I showed you in JSON and XML. It\n
190
00:18:40,690 --> 00:18:46,909
And for comparison, here it is next to JSON.\n
191
00:18:46,909 --> 00:18:51,280
and theyāre also used by applications to\n
192
00:18:51,279 --> 00:18:56,350
say about YAML. You donāt need to know it\n
193
00:18:56,351 --> 00:19:01,400
you should know basic things such as the fact\n
194
00:19:01,400 --> 00:19:06,048
that itās used in Ansible, because weāll\n
195
00:19:06,048 --> 00:19:12,158
Hereās what we covered in this video. I\n
196
00:19:12,159 --> 00:19:18,030
and why we need it. Basically, itās to provide\n
197
00:19:18,029 --> 00:19:24,139
communicate the data with each other. Then\n
198
00:19:24,140 --> 00:19:27,860
primarily on JSON because itās the one you\n
199
00:19:27,859 --> 00:19:34,049
todayās quiz I will give more questions\n
200
00:19:34,049 --> 00:19:40,190
interpreting JSON data. And make sure to watch\n
201
00:19:40,190 --> 00:19:46,340
from Boson Softwareās ExSim, the best practice\n
202
00:19:49,240 --> 00:19:54,371
In which of the following data serialization\n
203
00:19:54,371 --> 00:19:58,690
the video now to select the best answer.
204
00:19:58,690 --> 00:20:08,480
Okay, the answer is B, YAML. In JSON and XML\n
205
00:20:08,480 --> 00:20:13,450
However in YAML whitespace is significant,\n
206
00:20:17,569 --> 00:20:22,579
Which of the following data serialization\n
207
00:20:22,579 --> 00:20:30,629
Key, value, and then forward slash key. Pause\n
208
00:20:30,630 --> 00:20:40,150
Okay, the answer is C, XML. XML uses HTML-like\n
209
00:20:44,500 --> 00:20:49,599
Which of the following is NOT a valid JSON\n
210
00:20:53,038 --> 00:21:01,879
Okay, the answer is E, key. Although JSON\n
211
00:21:01,880 --> 00:21:08,200
a data type. All keys must be strings, and\n
212
00:21:11,750 --> 00:21:16,589
Examine the JSON-formatted data. Which of\n
213
00:21:16,589 --> 00:21:20,389
video now to select the best answer.
214
00:21:20,390 --> 00:21:29,030
Okay, the answer is C, there are too many\n
215
00:21:29,029 --> 00:21:34,788
comma. A comma is required between separate\n
216
00:21:34,788 --> 00:21:42,460
not put a comma after the last key-value pair.\n
217
00:21:42,460 --> 00:21:47,179
Examine the JSON-formatted data. Which of\n
218
00:21:47,179 --> 00:21:51,700
video now to select the best answer.
219
00:21:51,700 --> 00:22:00,179
Okay, the answer is B, the value of āip_interfacesā\n
220
00:22:00,179 --> 00:22:05,660
are multiple objects, but as these square\n
221
00:22:05,660 --> 00:22:12,890
array, thatās the JSON data type. Okay,\nletās go to question 6.
222
00:22:12,890 --> 00:22:18,100
Which of the following is an example of valid\n
223
00:22:21,798 --> 00:22:30,589
Okay, the answer is D. Let me point out the\n
224
00:22:30,589 --> 00:22:36,418
after the āinterfacesā key. It should\n
225
00:22:36,419 --> 00:22:42,600
value 5. A colon should only be used between\n
226
00:22:42,599 --> 00:22:51,599
is not valid here. And in C, there is a missing\n
227
00:22:51,599 --> 00:22:56,980
If multiple values are listed in an array,\n
228
00:22:56,980 --> 00:23:05,380
There are no problems with D, it is valid\n
229
00:23:05,380 --> 00:23:10,090
Examine the JSON-formatted data. Which of\n
230
00:23:10,089 --> 00:23:14,720
video now to select the best answer.
231
00:23:14,720 --> 00:23:23,150
Okay, the answer is A, the value of āis_upā\n
232
00:23:23,150 --> 00:23:28,769
Itās true, written without double quotes,\n
233
00:23:28,769 --> 00:23:36,859
true or false, and they are written without\n
234
00:23:36,859 --> 00:23:41,449
Examine the JSON-formatted data. Which of\n
235
00:23:41,450 --> 00:23:46,058
video now to select the best answer.
236
00:23:46,058 --> 00:23:54,910
Okay, the answer is D, it is valid JSON data.\n
237
00:23:54,910 --> 00:24:01,090
whitespace is insignificant in JSON, so this\n
238
00:24:01,089 --> 00:24:05,879
and line breaks to make it easier to read,\n
239
00:24:05,880 --> 00:24:12,860
doesnāt have any meaning in JSON. Okay,\nletās go to question 9.
240
00:24:12,859 --> 00:24:17,990
Examine the JSON-formatted data. Which of\n
241
00:24:17,990 --> 00:24:23,140
this question will be a bit more of a challenge.\n
242
00:24:23,140 --> 00:24:28,278
closing curly bracket, each opening square\n
243
00:24:28,278 --> 00:24:35,919
string has double quotes, etc. Pause the video\n
244
00:24:35,919 --> 00:24:44,399
Okay, the answer is C, a square bracket is\n
245
00:24:44,398 --> 00:24:49,869
is an array, it has an opening square bracket,\n
246
00:24:49,869 --> 00:24:54,709
closing square bracket for that array. Again,\n
247
00:24:54,710 --> 00:25:01,480
bracket has a closing bracket. Letās go\nto question 10.
248
00:25:01,480 --> 00:25:06,099
Examine the JSON-formatted data. Which of\n
249
00:25:06,099 --> 00:25:10,759
video now to select the best answer.
250
00:25:10,759 --> 00:25:19,460
Okay, the answer is A, it is valid JSON data.\n
251
00:25:19,460 --> 00:25:25,460
brackets, and the value of ādhcp4ā is\n
252
00:25:25,460 --> 00:25:29,370
practice was helpful for you. Thatās all\n
253
00:25:29,369 --> 00:25:33,795
bonus question from Boson Softwareās ExSim\nfor CCNA.
20678
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.