Gson from URL not filling up
<p>In my spare time i'm making this program just for fun and i stumbled upon this problem with GSON (probably a dumb mistake but i've been struggling for hours now).</p>

<p>Problem: response stays empty, screenshot with debugging: <a href="https://gyazo.com/5c804dbfea24e386c285e36a153ef108" rel="nofollow">https://gyazo.com/5c804dbfea24e386c285e36a153ef108</a></p>

<p>Example response:</p>

<pre><code>{
"response": {
    "total_count": 4,
    "games": [
        {
            "appid": 730,
            "name": "Counter-Strike: Global Offensive",
            "playtime_2weeks": 4467,
            "playtime_forever": 322428,
            "img_icon_url": "69f7ebe2735c366c65c0b33dae00e12dc40edbe4",
            "img_logo_url": "d0595ff02f5c79fd19b06f4d6165c3fda2372820"
        }
    ]

}
}
</code></pre>

<p>Code I use (yes I know the key for the API is invalid atm I have a key):</p>

<pre><code>private static String readUrl(String urlString) throws Exception {
    BufferedReader reader = null;
    try {
        URL url = new URL(urlString);
        reader = new BufferedReader(new InputStreamReader(url.openStream()));
        StringBuffer buffer = new StringBuffer();
        int read;
        char[] chars = new char[1024];
        while ((read = reader.read(chars)) != -1) {
            buffer.append(chars, 0, read);
        }
        return buffer.toString();
    } finally {
        if (reader != null) {
            reader.close();
        }
    }
}
static class Item
{
    int appid;
    String name;
    int playtime_2weeks;
    int playtime_forever;
    String img_icon_url;
    String img_logo_url;
}

static class Response
{
    int total_count;
    Item[] games;
}
public static void main(String[] args) throws Exception 
{
    String flusha = readUrl("http://api.steampowered.com/IPlayerService/GetRecentlyPlayedGames/v0001/?key=XXXXXXXXXX&amp;steamid=76561197991348083&amp;count=1&amp;format=json");
    Gson gson = new Gson();
    Response response = gson.fromJson(flusha, Response.class);
    System.out.print("flusha");
    for (Item i : response.games)
        System.out.println("    " + i.name + " played for " + i.playtime_2weeks + " in last 2 weeks");      
}
}
</code></pre>

<p>Well the problem is that response stays empty.</p>