json deserialization not working issue

Nov 4 2022 6:37 AM

Hi,

I have a class 

public class Employee
{
    public string EmpId { get; set; }
    public string EmpName { get; set; }
    public int Age { get; set; }
    public string[] qualification { get; set; }
}

And Json File

===========

[{ "empid": 53931, "empname": "Sundar", "age": "42",  "qualification": [],
 "empid": 53932, "empname": "Ramu", "age": "44",  "qualification": []}

 

my program to read json file

=======================

var jsonData = System.IO.File.ReadAllText(fullPath);
var readData = JsonConvert.DeserializeObject<List<Employee>>(jsonData);

 

The readData doesn't bind values to the qualification

Employee.empid    Employee.empname    Employee.age    
53951                     Sundear                       42
53952                     Ramu                           44

 


Answers (2)