http://codereview.appspot.com/183045/diff/1/2 File java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java (right):
http://codereview.appspot.com/183045/diff/1/2#newcode47 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:47: public static final String ASJSON_PARAM = "asJSON"; Thinking on this more, IMO it makes sense to tweak this a little bit. Rather than asJSON=1, I propose: &json=<symbol> The output will then be: var <symbol> = <JSON>; ...rather than the fixed symbol "_js". http://codereview.appspot.com/183045/diff/1/2#newcode101 java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/ConcatProxyServlet.java:101: if (isAsJson) { how about putting the asJson logic into the wrapper itself: ResponseWrapper.setJsonVar("_js"); // "_js" actually from query ...the above, when non-null, does JSON-escaping; otherwise existing behavior. http://codereview.appspot.com/183045

