Hi,

I'd be interested in any comments on this implementation of JSONP support
for the RPC endpoints.  This patch looks for 'request' and 'callback'
 params and if so it uses the request value for the inbound json and the
callback for the jsonp callback value.

Here's an example request in all it's url escaped glory:

http://localhost:8080/social/rpc?st=john.doe%3Ajohn.doe%3A6450%3Ashindig%3Ahttp%253A%2F%2Flocalhost%253A8080%2Fsamplecontainer%2Fexamples%2FSocialHelloWorld.xml%3A0%3Adefault&callback=foo&request=%5B%7B%22method%22%3A%22people.get%22%2C%22id%22%3A%22viewer%22%2C%22params%22%3A%7B%22sortBy%22%3A%22name%22%2C%22fields%22%3A%5B%22id%22%2C%22age%22%2C%22name%22%2C%22gender%22%2C%22profileUrl%22%2C%22thumbnailUrl%22%5D%2C%22userId%22%3A%22%40viewer%22%2C%22groupId%22%3A%22%40self%22%7D%7D%2C%7B%22method%22%3A%22people.get%22%2C%22id%22%3A%22viewerFriends%22%2C%22params%22%3A%7B%22sortBy%22%3A%22name%22%2C%22fields%22%3A%5B%22id%22%2C%22age%22%2C%22name%22%2C%22gender%22%2C%22profileUrl%22%2C%22thumbnailUrl%22%5D%2C%22userId%22%3A%22%40viewer%22%2C%22groupId%22%3A%22%40friends%22%7D%7D%2C%7B%22method%22%3A%22appdata.get%22%2C%22id%22%3A%22viewerData%22%2C%22params%22%3A%7B%22keys%22%3A%5B%22count%22%5D%2C%22userId%22%3A%22%40viewer%22%2C%22groupId%22%3A%22%40self%22%7D%7D%2C%7B%22method%22%3A%22appdata.get%22%2C%22id%22%3A%22viewerFriendData%22%2C%22params%22%3A%7B%22groupId%22%3A%22%40friends%22%2C%22keys%22%3A%5B%22count%22%5D%2C%22userId%22%3A%22%40viewer%22%7D%7D%5D
'



---------- Forwarded message ----------
From: <[email protected]>
Date: Fri, Apr 30, 2010 at 6:51 PM
Subject: JSON-RPC over JSONP support (issue1032045)
To: [email protected]
Cc: [email protected]


Reviewers: shindig.remailer_gmail.com,



Please review this at http://codereview.appspot.com/1032045/show

Affected files:
 M java/common/src/main/java/org/apache/shindig/common/servlet/HttpUtil.java
 M
java/common/src/main/java/org/apache/shindig/common/util/JsonConversionUtil.java
 M java/common/src/main/java/org/apache/shindig/protocol/JsonRpcServlet.java
 M
java/common/src/test/java/org/apache/shindig/common/util/JsonConversionUtilTest.java
 M
java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/RpcServlet.java

Reply via email to