【发布时间】:2011-06-18 18:43:50
【问题描述】:
我想反序列化以下json数据https://mtgox.com/code/data/getDepth.php。我不断收到错误消息。下面是我的代码。
Gson gson = new Gson();
String json = readHTTPS(new URL("https://mtgox.com/code/data/getDepth.php"));
AskBids askBids = gson.fromJson(json, AskBids.class);
我的 AskBids 类如下所示:
public class AskBids {
private String [] [] asks;
private String [] [] bids;
public AskBids(){}
}
错误是 get is com.google.gson.JsonParseException: Expecting object found: "asks"
有什么想法吗?谢谢
【问题讨论】: