Gson从空字符串解析一个Object

时间:2015-11-25 10:05:19

标签: json gson

当我使用GSON反序列化JSON字符串时,它会抛出JsonSyntaxException。我该如何处理?

{"QueueNum":1,"Result":"2","ResultMessage":"201","ReturnValue":"","TS":1448443938}
public class Response<T> {
    private int Result;
    private long TS;
    private float ResultMessage;
    private int QueueNum;
    private T ReturnValue;
}

0 个答案:

没有答案