All technologies support JSON?

Answer

Yes , Almost all technologies who deal with exchange of data support JSON. For instance if you want to that your WCF service should send JSON message rather than SOAP you can set the “ResponseFormat” as “WebMessageFormat.Json” on your operation contract.

[OperationContract]

[WebInvoke(Method="GET", UriTemplate="/GetData", RequestFormat=WebMessageFormat.Json,

           ResponseFormat=WebMessageFormat.Json)]

string GetData();

If you want your MVC to emit out JSON data you can return “JsonResult” as shown below. If you call the below action it will emit out Customer objects in Json format.

public JsonResult  CustomerJson()

{

     List obj1 = new List();

Thread.Sleep(5000);

            Customer obj = new Customer();

obj.CustomerCode = "1001";

obj1.Add(obj);

returnJson(obj1,JsonRequestBehavior.AllowGet);

}

                        

 

All JSON Questions

Ask your interview questions on json

Write Your comment or Questions if you want the answers on json from json Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---