I have a JSON object:
string bodyText = " {\"id\":16751112,\"firstname\":{\"value\":\"Sydni\",\"versions\":[{\"value\":\"Sydni\",\"source-type\":\"FORM\",\"source-id\":\"0eec9e33-4e82-4511-85ef-83556395e046\",\"source-label\":\"First Name\"} ";
and a class that maps to the json object:
public class Person
{
public string firstname { get; set; }
public string id { get; set; }
}
The following code populates the id property, but not the first name:
Person _Person = JsonConvert.DeserializeObject<Person>(bodyText);
Can someone please help me deserialize the fistname element in the json string object and store in in my _Person
object?