Nononono. No. Just please; no. That is not JSONP, it is javascript that executes a function with an object as its parameter that contains more javascript. Aaah!

This is JSON because it's just one object:

{
'one': 1,
'two': 2,
'three':3
}

This is JSONP because it's just one object passed through a function; if you go to http://somesite/get_some_object?jsonp=grab, the server will return:

grab({
'one': 1,
'two': 2,
'three':3
});

This is not JSON at all. It's just Javascript:

alert("hello");

And this? Javascript code stored inside a string (ouch!) inside an object passed to a function that should evaluate the string (but it might or might not):

grab({"body": "alert(\"Hello!\");\n"});

Look at all those semicolons and backslashes! I get nightmares from this kind of stuff. It's like a badly written Lisp macro because it's much more complicated than it needs to (and should!) be. Instead, define a function called grab in your code:

function grab(message) {
alert(message.body);
}

and then use JSONP to have the server return:

grab({body: "Hello!"});

Don't let the server decide how to run your web page Instead, let your web page decide how to run the web page and just have the server fill in the blanks.

I'm not sure what you're trying to do here, but nobody will use something like this. Nobody is going to trust your service to always execute as it should and output expected JavaScript code. You see Yahoo doing it because people trust Yahoo, but they will not trust you.