From the course: Writing Secure Code for Android by Infosec

Unlock this course with a free trial

Join today to access over 25,000 courses taught by industry experts.

Activity: Protecting JSON with an API key, part 2

Activity: Protecting JSON with an API key, part 2

From the course: Writing Secure Code for Android by Infosec

Activity: Protecting JSON with an API key, part 2

- [Instructor] Object Deserialization. Activity. Protecting JSON with an API Key Part 2. Earlier when we tried our weather app, we put in a city, we hit Submit, and we got the results. Now the results that we would show the user are just this, the city and the temperature. For our own information, we have included the entire JSON object right here, the entire response body. In our app, we're displaying the entire response body just unformatted. They're all kind of smashed together. It's hard to pick out the key value pairs. But if we look at a similar example from OpenWeather's documentation, this here is what it would look like if it was formatted nicely. The layout will be the same as our examples, just the values will be different. You can see that it is a whole bunch of key value pairs, but some of the values are whole objects. So this first key value pair, the name is coord, but the value is actually an entire JSON object with two key values inside, lon and lat for longitude and…

Contents