ADO.NET Data Services - format parameter - xml / json

The $ format parameter was removed with the release of ADO.NET Data Services with Service Pack 1 (SP1) for VS2008. I try to use it and I get an error message:

The query parameter '$ format' begins with the character '$' reserved by the system but not recognized.

I think the support for Atom stuff is very cool, but can you also get "plain old xml"?

+7
json wcf-data-services
source share
3 answers

This is now done through the http header "Accept"; use "application / json" for json. You can try text / xml for POX, but it is not mentioned in the article here .

(update: text / xml will return an atom based on the table here )

+4
source share

Pablo Castro has a clean solution: http://code.msdn.microsoft.com/DataServicesJSONP

It uses WCF behavior to get $ format = json

+3
source share

This blog post shows how to make $ format = json work using the ASP.NET stack: http://josheinstein.com/blog/index.php/2010/05/wcf-data-services-format-json/

0
source share

All Articles