-
Notifications
You must be signed in to change notification settings - Fork 136
QuickJSONLoad
Cinchoo edited this page Jul 1, 2017
·
5 revisions
To load JSON file, use ChoJSONReader component to parse it. Sample below shows how to load JSON file (Emp.json)
[
{
"Id": 1,
"Name": "Mark"
},
{
"Id": 2,
"Name": "Tom"
}
]
foreach (dynamic e in new ChoJSONReader("Emp.json"))
Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);
var reader = new ChoJSONReader("Emp.json");
dynamic rec;
while ((rec = reader.Read()) != null)
Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
}
foreach (var e in new ChoJSONReader<Employee>("Emp.json"))
Console.WriteLine("Id: " + e.Id + " Name: " + e.Name);
For more information, please visit below article
©2017 Cinchoo Inc