I am trying to deserialize a json for my class structure
I have the following JSON:
{
"Main": {
"Employees": {
"0": {
"FirstName": "Test ",
"LastName": "One"
},
"1": {
"FirstName": "Test ",
"LastName": "Two"
}
}
}
}
I want to deserialize it for the following class structure:
public class Main
{
public List<Employee> Employees { get; set; }
}
public class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
Can someone suggest me how to write a converter for this/ any other option to achieve this?
[],[ elements ]With values separated by comas.