February 2010
Beginner
400 pages
11h 13m
English
WDS services can return data in the following formats:
AtomPub
JSON
XML
AtomPub is the default format that is returned, and since WDS 1.5 you have control over how elements are mapped to AtomPub elements.
Let's look at how to return results in JSON format using jQuery and then how to access a WDS service from a console application.
JSON is a format commonly used by web applications since it is much less verbose than XML. JSON is also understood by many JavaScript frameworks and libraries. If you want to have WCF Data Services format your results as JSON, simply set the Accept header to application/json when making a request.
The following example shows how to use jQuery ...