I read a post about making JSON calls (with jQuery) safer by adding a dataFilter to parse the returned string.
However in the post it's explained (more specifically in a previous post linked from the above post):
It’s important to note the removal of the dataType parameter in the $.ajax() code above. This is required in order to prevent a double-eval of service responses containing only a single string.
Internally, jQuery uses a combination of the dataType parameter and the implicit type the response. If the dataType is "json" and typeof(response) is “string”, then jQuery uses eval() to deserialize the response.
But since I'm making a cross-domain call I can't remove the dataType it has to be set to json[p] to allow the call at all. But with this set the dataFilter isn't called, is there any way to filter the data without editing the internals of jQuery?
Anything important I've missed, just ask.
Thanks, Chris M