Padding the response with a function call - e.g. callback( ... ) - is
what makes it readable by pages from other domains.  If that's what
you need and the source domain provides only JSON:

            [{"symbol": "ABC","price": 87.86,"change": -0.41}]

then one solution (I've heard) is to create a "pipe" that reads the
JSON from the original source and outputs it as JSONP:

  callback( [{"symbol": "ABC","price": 87.86,"change": -0.41}] );

Pages from any domain may direct their requests to the pipe.

-- 
Michael Allan

Toronto, +1 416-699-9528
http://zelea.com/


Muhammad Muaz said:
> I am trying this tutorial 
> <https://developers.google.com/web-toolkit/doc/2.0/tutorial/Xsite>,it is 
> working fine if server specify the call back object, like if server prints 
> like this, 
> 
>     
> callback125([{"symbol":"DDD","price":10.610339195026,"change":0.053085447454327}]);
> 
> But my requirements are like, server can only print in pure `JSON` form 
> like this
> 
>     [{"symbol": "ABC","price": 87.86,"change": -0.41}]
> 
> I tried to do so, json is retrieving but the callback method is not 
> invoking, Is there any solution that we dont need to specify callback 
> method ?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to