Hi,

Conisider this action:

SampleAction{privateList<SampleVO>samples;//With setters and 
gettersprivateList<AnotherVO>anotherList;//With setters and 
gettersprivateStringanString;//With setters and getters@Action(value 
="/loadSelect",results ={@Result(name ="success",type 
="json")})publicStringloadSomeSamples(){samples =newArrayList<SampleVO>();//Put 
some object in samples.returnSUCCESS;}}
This will result to:

{"samples":{"0":{"property":"a"},"1":{"property":"b"},"2":{"property":"c"}},"anString":"hello","anotherList":{"0":{"prop1":"a","prop2":"b"},"1":{"prop1":"c","prop2":"d"}}}
Is it possible to configure json result to make below result

{"samples":{"0":{"property":"a"},"1":{"property":"b"},"2":{"property":"c"}}}

~Regards,
~~Alireza Fattahi

Reply via email to