You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dariusz Wojtas <dw...@gmail.com> on 2007/01/08 20:23:13 UTC

Re: Struts 2 & JSON

http://json.org/

Something of form:

[["name", "id"], ["name", "id"]]
or
[["name", "id"], ["name", "id"],]


Remember to escape special characters.

Dariusz Wojtas


On 1/8/07, André Faria <an...@mandic.com.br> wrote:
> What is necessary to write a JSON response in struts to use with a
> Autocomplete tag?
>
> example:
>
> public class JSONListAction {
>     public String execute {
>        ???????????????? return JSON  object!
>     }
> }
>
> <s:url id="json" value="/JSONList.action" />
> <s:autocompleter theme="ajax" href="%{json}" autoComplete="false"/>
>
>
>
> Thank's
> André Faria

Re: Struts 2 & JSON

Posted by Ted Husted <hu...@apache.org>.
See also

* https://issues.apache.org/struts/browse/WW-1604

On 1/8/07, Dariusz Wojtas <dw...@gmail.com> wrote:
> http://json.org/
>
> Something of form:
>
> [["name", "id"], ["name", "id"]]
> or
> [["name", "id"], ["name", "id"],]
>
>
> Remember to escape special characters.
>
> Dariusz Wojtas
>
>
> On 1/8/07, André Faria <an...@mandic.com.br> wrote:
> > What is necessary to write a JSON response in struts to use with a
> > Autocomplete tag?
> >
> > example:
> >
> > public class JSONListAction {
> >     public String execute {
> >        ???????????????? return JSON  object!
> >     }
> > }
> >
> > <s:url id="json" value="/JSONList.action" />
> > <s:autocompleter theme="ajax" href="%{json}" autoComplete="false"/>
> >
> >
> >
> > Thank's
> > André Faria
>

-- HTH, Ted.
* http://www.husted.com/struts/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org