解析Google Plus JSON對象C#解析JSON到泛型集合
使用C#和Newtonsoft.Json庫如何解析下面的json代碼?
[["tsg.lac",
[[["3a4a7e8e0b3d5d66"],["Friends",null,"Your real friends, the ones you feel comfortable sharing private details with.",null,null,null,null,null,null,2,2,null,"00000000",1,1,1]]
,[["5947b6d78a8231f3"],["Family",null,"Your close and extended family, with as many or as few in-laws as you want.",null,null,null,null,null,null,2,2,null,"00000001",2,1,1]]
,[["22d0e3ec8c38fa24"],["Acquaintances",null,"A good place to stick people you've met but aren't particularly close to.",null,null,null,null,null,null,2,2,null,"00000002",5,1,1]]
,[["1adf9b0b0987c2ad"],["Following",null,"People you don't know personally, but whose posts you find interesting.",null,null,null,null,null,null,2,2,null,"00000003",6,1,1]]
,[["15"],["Blocked",null,null,null,null,null,null,null,null,2,1,null,"z9",null,1,1]]]
,[]
]
]
基本上,如果你不知道原始結構,你該如何解析Json? 是否有可能將其解析爲通用鍵/值集合?
男人你是傳奇人物,就像魅力一樣,正是我所尋找的。謝謝 – Tim 2011-12-24 23:20:18
剛剛獲得JsonView它確實有助於瞭解JSON對象的結構。謝謝 – Tim 2011-12-24 23:35:47
不客氣。 :) – 2011-12-24 23:39:16