Deserialize JSON object to C# object

c#, json, restsharp

Solution

You can use Json.Net and `dynamic` keyword together

dynamic dynObj = JsonConvert.DeserializeObject(json);
Console.WriteLine(dynObj.fields.customfield_11414.name + " " + 
                  dynObj.fields.summary.value);

Problem

Im trying to read some json data using RestSharp. But im having some problems reading json objects. I have this respons: ``` expand: "html", self: "<url>/INCIDENT-447", key: "INCIDENT-447", fields: { customfield_11414: { name: "Corrective Measures", type: "com.atlassian.jira.plugin.system.customfieldtypes:textarea" }, summary: { name: "summary", type: "java.lang.String", value: "BLA BLA BLA" }, ``` I need to create a object with Property's summery and customfield_11414 But i only need the value of them. Not the entire JSON object

Original source