‫In the previous video, we learned about the Json syntax.
‫In this video, we'll learn how to format or prettify a Json response.
‫Let's go back to the API dot the movie db.org and this is the response from the server sending us the
‫popular movies and if Json form.
‫But this is not readable to prettify or format a Json response to make it more human readable, you
‫can use various tools, online services or code editors.
‫Here are several methods you can use, like the online Json, certifiers, text editors and Ides command
‫line tools and programming languages.
‫But I will use in our example the online Json certifiers.
‫There are several online Json pretty fires tools available that allow you to paste your Json response
‫and they will automatically format it for you.
‫So I'll copy this whole response.
‫I can go to the code beauty viborg json formatter.org json, pretty print dot net and many other websites.
‫I love to use this json viewer and called beautify.org paste the response and you can see to the right
‫here we can see the formatted Json.
‫We can see we have object for page equal to one.
‫The key is page, the value is one.
‫So we are on page number one.
‫So this is an array called result.
‫This is the key named as results and the value is 20 items.
‫Inside this array we have 20 objects.
‫The first one is zero.
‫The key if it is zero and contains 14 items inside this first object, we have 14 key value pairs.
‫The first one is adult equal to false.
‫This is the key value false backdrop path.
‫This is the image of the movie.
‫And there is another array here called January IDs ID and its value original language.
‫Its value original title key took to me overview key and this is the value of it.
‫Key value key value and till the 14th element.
‫So every object inside this array called result contains 14 items, contains 14 key value pairs.
‫This is object number zero.
‫If we click on it, we can see it's collapsing.
‫The second object inside this array having a key one and the value 14 objects key value pairs the key
‫adult false backdrop path here and so on.
‫Every object inside this array contains 14 key value pairs, and if you scroll down, you can see there
‫is another key value called total pages for 0183 and another key value total results.
‫803643.
‫So inside this response, this Json response, we have an object containing four elements, four key
‫value pairs.
‫The first one is page, the value is one, the second element is result and its value is an array of
‫20 elements.
‫The third element is total pages and its value is 40 1A3.
‫And the fourth element is total results and its value is 803643.
‫And inside this results array we have 20 elements starting from 0 to 90.
‫This is what we're going to fetch.
‫This is the response that we're going to translate to transform it into pojo elements, plain old Java
‫objects and display the response to the user interface.