title: how to get a specific value from JSON string
body: <pre><code>//Open url and fetch JSON data
  String s = "MY_URL_HERE";
  URL url = new URL(s);
  Scanner scan = new Scanner(url.openStream());
  String str = new String();
  while (scan.hasNext())
  {
      str += scan.nextLine();
  }
  scan.close();
  
  System.out.println(str);
  </code></pre>
  
  <p>str will print a string like :</p>
  
  <pre><code>{"coord":{"lon":-80.25,"lat":43.55},"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon"...ect
  </code></pre>
  
  <p>I am using json_simple-1.1.jar</p>
  
  <p>How do I actually use this string to extract values of my choosing? If i wanted to pull out the "description" or the "weather". </p>
  
  <p>I have tried snippets from:</p>
  
  <p><a href="https://code.google.com/p/json-simple/wiki/DecodingExamples" rel="nofollow">https://code.google.com/p/json-simple/wiki/DecodingExamples</a></p>
  
  <p>These do not work for me, I get an error </p>
  
  <pre><code>org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray
  </code></pre>