???????????? ????????? ??????? ? ??????? Gson

???? ?? ???????, ?? ??????? ?? ?? ?????? ????????????? ????????? ?????? ? Json?

??????:

public class AnonymousTest
{
    private Gson gson = new Gson();

    public void goWild()
    {
        this.callBack(new Result()
        {
            public void loginResult(Result loginAttempt)
            {
                // Output null
                System.out.println(this.gson.toJson(result));   
            }
        });
    }

    public void callBack(Result result)
    {
        // Output null
        System.out.println(this.gson.toJson(result));
        result.loginResult(result);
    }

    public static void main(String[] args) 
    {
        new AnonymousTest().goWild();
    }
}

?????? ????? :)

8
задан Lucas Arrefelt 24 May 2012 в 22:39
поделиться