Add multiple items in JSON array to object in C# using Json.net?

Something like this has worked for me in the past.

Something like this has worked for me in the past: JObject o = JObject. Parse(json); // This would be the string you defined above // The next line should yield a List of Person objects... List list = JsonConvert. DeserializeObject(o"data".ToString()); You might want to decorate your Person object as follows: JsonObject(MemberSerialization.

OptIn) public class Person { JsonProperty public string name{get;set;} JsonProperty public string email{get;set;} }.

Deserialize as : public class JsonData { public List Data {get;set;} }.

You could use an anonymous type. Var template = new { data = new Person { } }; Person emps = JsonConvert . DeserializeAnonymousType(json, template) .data.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions