У меня есть следующий 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()
{
}
}
Почему бы не попробовать с помощью онлайн-генератора POCO, например, http://json2csharp.com? – Miki