@Override
    public GistUser deserializeUserFromJson(String json) {
        JSONObject userJO = null;
        try {
            userJO = (JSONObject) parser.parse(json);
        } catch (ParseException e) {
            return null;
        }

        GistUser user = new GistUser();
        Object temp = null;

        user.setLogin((String) userJO.get("login"));
        user.setUrl((String) userJO.get("url"));
        user.setCreatedAt((String) userJO.get("created_at"));
        user.setAvatarUrl((String) userJO.get("avatar_url"));
        user.setGravatarUrl((String) userJO.get("gravatar_url"));
        user.setHtmlUrl((String) userJO.get("html_url"));
        user.setName((String) userJO.get("name"));
        user.setType((String) userJO.get("type"));
        user.setCompany((String) userJO.get("company"));
        user.setLocation((String) userJO.get("location"));
        user.setBlog((String) userJO.get("blog"));
        user.setEmail((String) userJO.get("email"));
        user.setBio((String) userJO.get("bio"));

        temp = userJO.get("id");
        if (temp != null) user.setId((Long) temp);
        else user.setId(0L);
        temp = userJO.get("hireable");
        if (temp != null) user.setHireable((Boolean) temp);
        else user.setHireable(false);
        temp = userJO.get("followers");
        if (temp != null) user.setFollowerCount((Integer) temp);
        else user.setFollowerCount(0);
        temp = userJO.get("following");
        if (temp != null) user.setFollowingCount((Integer) temp);
        else user.setFollowingCount(0);
        temp = userJO.get("public_repos");
        if (temp != null) user.setPublicRepoCount((Integer) temp);
        else user.setPublicRepoCount(0);
        temp = userJO.get("public_gists");
        if (temp != null) user.setPublicGistCount((Integer) temp);
        else user.setPublicGistCount(0);
        temp = userJO.get("private_gists");
        if (temp != null) user.setPrivateGistCount((Integer) temp);
        else user.setPrivateGistCount(0);
        temp = userJO.get("total_private_repos");

        if (temp != null) {
            user.setPrivateRepoCount((Integer) temp);
            //Got private info, must be authenticated user
            user.setIsMe(true);
        }
        else {
            user.setPrivateRepoCount(0);
            //No private info, must not be authenticated
            user.setIsMe(false);
        }

        return user;
    }