This article will give you the tools and show you how to do what you are asking:
Working with JSON in C# & VB[
^]
Also, there is an error in your JSON data. It should be:
{
"concepts": {
"http://dbpedia.org/resource/Chuckles_(G.I._Joe)": {
"SurfaceForms": [
{
"Score": 0.9460024,
"String": "CHUCKLES",
"Offset": 3
}
],
"Types": [ "" ],
"Support": 52
}
},
"concepts": {
"http://dbpedia.org/resource/Memory,_Sorrow,_and_Thorn": {
"SurfaceForms": [
{
"Score": 1.0,
"String": "Sithi",
"Offset": 2
}
],
"Types": [ "" ],
"Support": 43
}
}
}
And here is the C# classes generated by
JSON Utils: Generate C#, VB.Net, SQL Table, Java and PHP from JSON[
^]:
public class SurfaceForm
{
[JsonProperty("Score")]
public double Score { get; set; }
[JsonProperty("String")]
public string String { get; set; }
[JsonProperty("Offset")]
public int Offset { get; set; }
}
public class HttpDbpediaOrgResourceMemorySorrowAndThorn
{
[JsonProperty("SurfaceForms")]
public IList<SurfaceForm> SurfaceForms { get; set; }
[JsonProperty("Types")]
public IList<string> Types { get; set; }
[JsonProperty("Support")]
public int Support { get; set; }
}
public class Concepts
{
[JsonProperty("http://dbpedia.org/resource/Memory,_Sorrow,_and_Thorn")]
public HttpDbpediaOrgResourceMemorySorrowAndThorn HttpDbpediaOrgResourceMemorySorrowAndThorn { get; set; }
}
public class Result
{
[JsonProperty("concepts")]
public Concepts Concepts { get; set; }
}
To populate the classes, the above
article link[
^] will show you how.