0
我有以下的JSON從Documentum的我如何反序列化JSON從Documentum的REST服務
返回{
"resources" : {
"http://identifiers.emc.com/linkrel/repositories" : {
"href" : "http://stg1docapp10:7000/dctm-rest/repositories.json",
"hints" : {
"allow" : ["GET"],
"representations" : ["application/xml", "application/json", "application/atom+xml", "application/vnd.emc.documentum+json"]
}
},
"about" : {
"href" : "http://stg1docapp10:7000/dctm-rest/product-info.json",
"hints" : {
"allow" : ["GET"],
"representations" : ["application/xml", "application/json", "application/vnd.emc.documentum+xml", "application/vnd.emc.documentum+json"]
}
}
}
}
我想找到的是如何將它轉換成一個類;
我已經試過
Dictionary<String,String> ds = JsonConvert.DeserializeObject<Dictionary<String, String>>(result);
,我曾嘗試定義下面的類,它反序列化到該。
public class DocumentumServices
: IDisposable
{
public String href { get; set; }
public IList<String> hints { get; set; }
public void Dispose()
{
}
}
爲什麼不嘗試使用像http://json2csharp.com這樣的在線POCO生成器? – Miki