Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Has the $format parameter been removed with the VS2008 SP1 release of ADO.NET Data Services. I try to use it and I get the error:

The query parameter '$format' begins with a system-reserved '$' character but is not recognized.

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

like image 328
BuddyJoe Avatar asked Feb 03 '09 04:02

BuddyJoe


2 Answers

This is now done via the http "Accept" header; use "application/json" for json. You could try "text/xml" for POX, but it isn't mentioned in the article here.

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

like image 131
Marc Gravell Avatar answered Oct 03 '22 22:10

Marc Gravell


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

It uses WCF behaviors to pick up $format=json

like image 39
Rob Fonseca-Ensor Avatar answered Oct 04 '22 00:10

Rob Fonseca-Ensor