0
我有一個包含多個列表的類。 gson的課堂設計是否正確?使用gson反序列化一個類中的多個ArrayLists
我的類:
Class Data
{
List<String> actor;
List<Integer> text_relevance;
List<String> title;
}
JSON字符串如下... 是一流的設計此JSON正確的?
{
"data":
{
"actor":["Abercrombie, Ian","Baker, Dee Bradley","Burton, Corey",
"Eckstein, Ashley","Futterman, Nika","Kane, Tom",
"Lanter, Matt","Taber, Catherine","Taylor, James Arnold",
"Wood, Matthew"],
"text_relevance":["308"],
"title":["Star Wars: The Clone Wars"]
}
}
text_relevance不是整數數組,它是一個字符串數組,因爲它在數字周圍有「」。 – Cheesebaron 2012-07-15 15:26:28