WCF and JSON

You can also use the WebGet attribute to specify the format for request and response messages By default, operations marked with WebGet send response messages formatted as XML data, and the WCF runtime serializes them as POX objects However, you can send response messages in JSON format by specifying the ResponseFormat property of the WebGet attribute with the value WebMessageFormat.Json, as shown here:
[WebGet(Uri Template = ". . .", ResponseFormat = WebMessageFormat.Json) ]
Windows® Communication Foundation 4 Step by Step

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s