I have a situation where I have Json Values as List of string.
List<string> values = new List<string>()
{
"{\"Id\":\"SC\",\"Value\":8563}",
"{\"Id\":\"SC\",\"Value\":8563}",
"{\"Id\":\"SC\",\"Value\":8563}"
};
How to I de-serialize into a List of Objects:
public class ClassA
{
public string Id {get; set;}
public int Value {get;set;}
}
var objectValues = JsonConvert.DeserializeObject<IEnumerable<ClassA>>(values);
I couldn't deserialize when I am passing values list and it is expecting a string as parameter; can I create an extension method or is there an easier way to deserizalize ?