예제 #1
0
 private static string SerializeEmployee(Employee employee)
 {
     using (var output = new StringWriter())
     {
         JSON.Serialize(
            employee,
             output
         );
         return output.ToString();
     }
 }
예제 #2
0
 private static Employee GetEmployee()
 {
     var employee = new Employee
     {
         EmployeeId = 1,
         FirstName = "Jalpesh",
         LastName = "Vadgama",
         Designation = "Technial Architect"
     };
     return employee;
 }