 So just to see an implementation of why we might want to use a map class I like to kind of introduce this idea of openweathermap.org One of the things you see very quickly is that they have this Function that allows me to use an API. That's pretty nice because as you can see they allow you to if I wanted to design some application maybe a An Android application or Java, you know desktop application I could sign up for this. Just here's a shameless plug. There's no link I don't think they even do like a reference model. So Openweathermap.org please pay me. I'm advertising your site, right? No, I can sign up I can get an API key and that'll allow me to make 60 calls You know, I can actually connect to their website 60 times in a minute and grab current weather data well five day forecast not a 16 day But you know, that's what you get for literally paying nothing The intro the idea though is let's say for example, I did want to get my Current weather data they happen to have an API which starts to break down Just how I would go about looking into making a call if say for example, I wanted to look up London UK I would simply make a request to this URL And as a result it would spit out just to kind of move it for you guys a little bit. It would spit out some JSON implementation now Jason is just one of the very one of the many implementations of how people present data But the reason why this is important is What if I wanted to have some implementation? I've already built it out because that's a lot of stuff to do So I just went ahead and kind of implemented it for us But I've imported a few of the IO classes that way I can read the data from the URL from the .net class and what do you know I happen to have that hash map We've just talking about I did need to use a third-party Application I did need to use Google JSON because I need to convert from JSON to a map because of this Java does not have a Working translator in itself Java if you're listening I would really like a way to just convert JSON into a map Thank you. Good day. Anyway, so okay. Well, I'm just coming down here This is literally the command that can convert JSON into a map. So if that's all you're looking for on this video Just take that and you owe me royalties. No, so please don't abuse my 60 API key literally sign up for yourself But okay. Well, I want to look up Raleigh, North Carolina. I want to know what the current temperature is there So here's my URL string where I put in my location simple enough There's my API key and because I live in the good old-fashioned United States of America We like to do everything right with Imperial if you're over in the UK, please don't you know get hurt You can change it to metric if you want you can change it to Kelvin if you want so anyways, okay Well, I'm building out the string. I this is just something that I'm using so I can keep on receiving data. I Basically create the URL. This is just a string for right now I open the connection to open weather map.org and I start reading in All of my results whatever their responses. I'm just pulling that in the thing I want to point out though is that being read in as a string So I do have to make that JSON to map conversion, but as you can kind of see I now have my different maps as You can see I have the ability to then come in and do that same get command We were seeing before notice my key in this case is no longer a character, but it's a string now for my sake I am saying an object because this if we look is You know it's returning that it's a hideous hideous thing. So I'm just saying it'll be some object whatever it is you know work with me and So in this regard I see that I'm gonna get a temp that I'm gonna get the humidity I'm gonna get the speed and I'm gonna get the deg so in this case if I were to come in and Spit this out Just I want to kind of get to where there we are we see what I would be printing out Java C Dictionary Get request example Why are you crashing on me? It does not ah I Always forget to do that. Give me a moment Dictionary. This is actually why I made a compile as well It's because I need to include that in my source path So in that case I make that Java add that G son to my course path my class path, sorry Then I can do the dictionary Now it compiles perfectly fine. We're gonna do the exact same thing for running it Class path include the current class path and then the G son dot jar And then finally the dictionary example class once again We see that I've got my current temperature. I've got my Current humidity wind speeds and the angle and once I hit enter I should see I'm doing a nice little print out of Wake County as we can see Raleigh the current temperature here is 85.8 degrees Fahrenheit the humidity is 58 percent the wind speed is 4.7 miles per hour and it is blowing at whatever that gets converted to I didn't sit down and do that on my own So I hope you enjoyed that