Browse by Tags
All Tags »
Json (
RSS)
To JSON or not to JSON? I want to introduce some performance testing about DataContractJsonSerializer against DataContractSerializer . But first, I want to explain what is JSON and DataContractJsonSerializer? What is JSON? JSON (JavaScript Object Notation) is a lightweight syntax for representing data that enabling fast exchanges of small amount of data between client browsers and AJAX -enabled Web services. JSON encodes data using subset of the JavaScript object literals, and it easier to "parse"...
WCF Json: Sending Complex Type on Query String In the previous post HTTP Web Programming with WCF 3.5: Creating a Template based URI I show how to use WebGet and WebInvoke attributes, which makes the operations avaliable via HTTP.GET and HTTP.POST respectively. In this post I will show how to send a complex type via query string on WCF operation via HTTP.GET . Service Contract The following code sample define the service contract and the complex type Product which will send. [ ServiceContract (Namespace...
WCF Services and Ajax In this post I show a sample of a WCF 3.5 service which supports Json . WebGetAttribute.ResponseFormat Property The WebMessageFormat property determines the format of responses sent from a service operation. The two possibe values are Xml and Json . The following example demonstrates how to set the ResponseFormatProperty: [ ServiceContract ] public interface IService { [ OperationContract ] [ WebGet (ResponseFormat = WebMessageFormat .Json)] String SayHello( String name); }...