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