How To return only array not json object in struts2 How To return only array not json object in struts2 json json

How To return only array not json object in struts2


You need to specify the object you want to be serialized as the root object:

<result name="json" type="json">        <param name="root">        commissioner_info    </param></result>

Otherwise the whole action will be serialized. Read more here.