You are developing a C# application. The application references and calls a RESTful web service named
EmployeeService. The EmployeeService web service includes a method named GetEmployee, which accepts
an employee ID as a parameter. The web service returns the following JSON data from the method.
{“Id”:1,”Name”:”David Jones”>
The following code segment invokes the service and stores the result:
You need to convert the returned JSON data to an Employee object for use in the application.
Which code segment should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
http://vceguide.com/which-code-segment-should-you-use-60/
I think it’s B.
DataContractJsonSerializer is used to serialize an object manually to JSON.
The requirement is to convert the returned JSON data to an Employee object.
definitely C