Everything run and Deserialize OK. Except the Roles is show up as System.Collections.Generic.List`1[System.String]
Problem
If I want to attach each field to a grid. Is there a way to show the collection as a string without looping through the Roles property?
JSON
[{
"Name":"test",
"Email": "[email protected]",
"Roles": ["Admin","User","Guest"],
"Age":"23"
},
{
"Name":"test1",
"Email": "[email protected]",
"Roles": ["Admin", "User" ,"Guest"],
"Age":"33"
}]
Model
public class example
{
public string Name { get; set; }
public string Email { get; set; }
public IList<string> Roles { get; set; }
public string Age { get; set; }
}
Deserialization
List<Exampe> list = JsonConvert.DeserializeObject<List<Exampe>>(bundle);