2016-01-17 34 views

回答

2

這看起來就像一張地圖,這樣你可以使用一個HashMapcalendar領域:

public class Root { 
    HashMap<String, Entry> calendar; 

    public static class Entry { 
     String year, month; 
    } 
} 

而只是匹配GSON代碼的完整性:

Root root = new Gson().fromJson(json, Root.class); 
相關問題