Code example for Gson

    private final String clientToken;
    private final Gson gson;
    public YggdrasilAuthenticationService(final Proxy proxy, final String clientToken) {
        this.gson = new Gson();
        this.clientToken = clientToken;
    public UserAuthentication createUserAuthentication(final Agent agent) {
        return new YggdrasilUserAuthentication(this, agent);
    public MinecraftSessionService createMinecraftSessionService() { 
        return new YggdrasilMinecraftSessionService(this);
    protected <T extends Response> T makeRequest(final URL url, final Object input, final Class<T> classOfT,String username) throws AuthenticationException {
Connect your IDE to all the code out there  Get Codota for Java