‫We succeeded in getting the API key from the Tmdb website and we learned about Http requests and responses.
‫We succeeded in getting the response of latest movies and popular movies as Json format.
‫Now let's dive into the Json syntax and learn about this amazing lightweight data interchange format.
‫So what is Jason?
‫Jason JavaScript object notation is a lightweight data interchange format that is easy for both humans
‫and machines to read and write.
‫Jason Data consists of a collection of key value pairs and is often used to represent structured data.
‫Here are the primary elements of Jason.
‫The first element is the array.
‫Array in Jason is an ordered list of values enclosed in square brackets.
‫Arrays can contain values of any type, including strings, numbers, objects, arrays, booleans and
‫null.
‫The second element is objects.
‫An object in Jason is an unordered collection of key value pairs enclosed in curly braces.
‫Each key is a string and the keys are unique within an object.
‫Values can be strings, numbers, objects, arrays, booleans, null or any other Json object.
‫The third element is the key.
‫A Json object contains a key that is just a string.
‫Pairs of key value make up a Json object.
‫Each key is a string that represents the name of the data item, and the value can be of any Json data
‫type.
‫Key value pairs are separated by colons.
‫The value Each key has a value that could be a string integer or double and any other data type in Json.
‫Let's deep dive into these elements.
‫Let's start with the keys.
‫As mentioned before, in Json keys must be strings written with double quotes.
‫For example, this name is included in double quotes and of type string.
‫So the name represents a key Json value values must be one of the following data types.
‫A string, a number, an object, an array, a boolean or Null in Json.
‫String values must be written with double quotes.
‫For example he'll Json objects.
‫Json object literals are surrounded by curly braces.
‫Json object literals contains key value pairs.
‫Key and value are separated by a colon.
‫Keys must be strings and values must be a valid Json data type string number object array, boolean
‫and null.
‫Each key value pair is separated by a comma.
‫You can see this comma, so each key value pair is separated by a comma.
‫Json arrays.
‫Arrays in Json are almost the same as arrays in JavaScript.
‫In Json array values must be of type string number, object array, boolean or null.
‫In a Json file, square bracket represents a Json array.
‫So in this video we learned about the Json syntax and we learned about the elements, the arrays, objects,
‫key value and values.
‫In the next video, we'll learn how to prettify the response, how to read the response from the website,
‫from the HTML into objects or plain Json format file formats in order to read them.