saved by9 people, first byjfm2038 on 2006-04-24, last byRavichandra C on 2008-08-03
The client decides on the arbitrary prepended text by using a query argument named jsonp with the text to prepend. Simple! With an empty jsonp argument, the result document is simply JSON wrapped in parentheses.
Let's take the del.icio.us JSON API as an example. This API has a "script tag" variant that looks like this: