title: JsonObject not found
body: <p>I am calling an api through the following code, </p>
  
  <pre><code>System.out.println("its running");
  String realTimeData = "https://api.coindesk.com/v1/bpi/currentprice.json";
  HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection();
  conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2");
  conn.setRequestMethod("GET");
  
  String inputline;
  BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
  String inputLine;
  StringBuilder response = new StringBuilder();
  while ((inputLine = in.readLine()) != null){
      System.out.println(response.append(inputLine));
  }
  in.close();
  </code></pre>
  
  <p>where <code>response</code> outputs the following Json output.</p>
  
  <pre><code>{"time":{"updated":"Mar 4, 2018 18:53:00 UTC","updatedISO":"2018-03-04T18:53:00+00:00","updateduk":"Mar 4, 2018 at 18:53 GMT"},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org","chartName":"Bitcoin","bpi":{"USD":{"code":"USD","symbol":"&amp;#36;","rate":"11,333.4625","description":"United States Dollar","rate_float":11333.4625},"GBP":{"code":"GBP","symbol":"&amp;pound;","rate":"8,208.4869","description":"British Pound Sterling","rate_float":8208.4869},"EUR":{"code":"EUR","symbol":"&amp;euro;","rate":"9,200.3915","description":"Euro","rate_float":9200.3915}}}
  </code></pre>
  
  <p>I am trying to get the data through keys, using this code</p>
  
  <pre><code>JSONObject json = new JSONObject(response);
  String rate = json.getString("time");
  System.out.println("rate was "+rate);
  </code></pre>
  
  <p>Whenever I run the above snippet, I get a <code>JsonObject {"time"} not found</code>. My conclusion is either I don't understand what is a "key" in the above json format. or the <code>response</code> that CoinDesk spits out is not getting treated as Json in my code. </p>