You need to return an anonymous object that is serialized to JSON

You are developing an ASP.NET Web API action method.
The action method must return the following JSON inthe message body.
{“Name”:”Fabrikam”, “Vendor Id”: 9823, “Items”: [“Apples”, “Oranges”]}
You need to return an anonymous object that is serialized to JSON.
What should you do?

You are developing an ASP.NET Web API action method.
The action method must return the following JSON inthe message body.
{“Name”:”Fabrikam”, “Vendor Id”: 9823, “Items”: [“Apples”, “Oranges”]}
You need to return an anonymous object that is serialized to JSON.
What should you do?

Answer:

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Sankarsai Mohandas

Sankarsai Mohandas

first box=return new
second box=”Fabrikam”, VendorNumber=9823
third box=new List{“Apples”,”Oranges”}