title: GSON - Json Parsing Error
body: <pre><code>try{            
      JsonElement rawJson =
              GsonUtils.JsonParser.parse(new InputStreamReader(
                  new URL("http://api.mineplex.com/pc/player/abc?apiKey=1")
                    .openConnection().getInputStream()));
  
       }catch(JsonIOException | JsonSyntaxException | IOException e){
                      e.printStackTrace();
          }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>public class GsonUtils
  {
      public static Gson gson = new Gson();
      public static Gson prettyGson = new GsonBuilder().setPrettyPrinting()
          .create();
      public static JsonParser jsonParser = new JsonParser();
  }
  </code></pre>
  
  <p>were the classes I used to get the JSON and parse it. But when I run the first one, it reports the following stacktrace:</p>
  
  <pre><code>com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2
      at com.google.gson.JsonParser.parse(JsonParser.java:65)
  ...
  Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2
      at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
      at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386)
      at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531)
      at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
      at com.google.gson.JsonParser.parse(JsonParser.java:60)
      ... 13 more
  </code></pre>
  
  <p>It tells me to add <code>JsonReader.setLenient(true)</code> to my code but my code doesn't use JsonReader. Then how can I add <code>setLenient(true)</code> to my code?</p>
  
  <p>EDIT: Add API response (formatted):</p>
  
  <pre><code>{
    "statusCode": 401,
    "error": "Unauthorized",
    "message": "Invalid API Key. To get an api key use the /api command in game"
  }
  </code></pre>