title: Parsing a simple one line json in Java
body: <p>I'm actually trying to parse the game time from this page <a href="https://api.mikx.ca/7d2d/mx7d-hard.json" rel="nofollow noreferrer">https://api.mikx.ca/7d2d/mx7d-hard.json</a>
  So far I only get the whole line everything i've tried to get the "days" is not working</p>
  
  <pre><code>InputStream sevenDays = null;
  
      sevenDays = new URL("https://api.mikx.ca/7d2d/mx7d-hard.json").openStream();
      BufferedReader rd = new BufferedReader(new InputStreamReader(sevenDays, Charset.forName("UTF-8")));
      StringBuilder sb = new StringBuilder();
      int cp;
      while ((cp = rd.read()) != -1)
      {
          sb.append((char) cp);
      }
     JsonParser jsonParser = new JsonParser();
     jsonParser.parse(sb.toString());
     JsonObject json = new JsonObject();
     Object object = jsonParser.parse(sb.toString());
     json = (JsonObject) object;
  </code></pre>