A good description: http://stackoverflow.com/questions/6339790/what-does-a-ajax-...
The idea: you need such workaround only if you return JSON Array.
Most of the API returns JSON Object in which case the attack does not work, it will result in syntax error.