Way to disable ?$format=json in request uri?

Jun 23, 2011 at 10:03 PM
Edited Jun 23, 2011 at 10:07 PM


I'm using datajs version 0.0.4 to query the netflix odata api.

I've run into a problem with certain netflix uris.


This uri works fine (taken from there docs):


But this url (sent by datajs) does not:




<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<message xml:lang="en-US">
The query parameter '$callback' begins with a system-reserved '$' character but is not recognized.


Any ideas how I can work around this?

Jun 23, 2011 at 10:09 PM

Note also that this url:



"error": {
"code": "", "message": {
"lang": "en-US", "value": "Unsupported media type requested."

So it looks like a problem on the netflix end - it doesn't accept a format parameter.  

Hopefully there is a setting in datajs where I can turn the parameters off or somehow work around this?
Jun 24, 2011 at 2:47 AM

The problem is unfortunately all on the server side. There is no JSON representation for $count, so the server can't turn that into a JSONP response.

We're working on updating the commonly-used JSONP behavior to handle text types as well, and should have that available soon-ish.

Jun 24, 2011 at 8:37 PM

The v0.3 release of the JSONP behavior at http://archive.msdn.microsoft.com/DataServicesJSONP now supports $count (by virtue of supporting text/plain conversions into JSONP payloads). odata.netflix.com doesn't have this yet, but it should work for you if you're JSONP-enabling your own services.