This was working well in SharePoint 2007. unfortunately, since we migrated to SharePoint 2010, a http GET request on a JSON file fails with:
An error occured while processing resource
/foo/bar.json. The page must have a
<%@ webservice class="MyNamespace.MyClass" ... %>directive.
This just doesn't make sense. I want the json file to be served as a plain-text resource.
How can I fix this error?