We don't use anything specific, just construct the JS string on the fly.

JSString = "{field1:"+value1+",field2:"+value2+"}";

HttpServletResponse response = data.getResponse();
response.setContentType("text/javascript");
response.getOutputStream().getWriter().println(JSString);

Not pretty but works for the AJAX we do.

> Date: Mon, 16 Feb 2009 23:56:15 +0100
> Subject: JSON
> From: [email protected]
> To: [email protected]
> 
> Hello,
> 
> I see that Turbine 2.3.3 includes a JSON-RPC module.
> I'm trying to integrate GWT with my Turbine applications through JSON, and
> just got into the JSON stuff. As far as I can tell the JSON-RPC bridge can't
> help me with that (correct me if I'm wrong); Is there anything in Turbine I
> can use to generate JSON responses to a regurar URL call?
> 
> Thanks in advance,
> Bo

_________________________________________________________________
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
  • JSON Boudewijn van Weert
    • RE: JSON Sheldon Ross

Reply via email to