Struts 2 JSON插件似乎默认返回一个对象结构({..ect ..})作为基本值 - 是否有办法配置struts 2 json插件,使其返回一个数组对象,像这样?
[
{
"blah1": "1",
"blah2": "2"
},
{
"blah3": "3",
"blah4": "4"
}
]
答案 0 :(得分:1)
<result name="success" type="json">
<param name="contentType">application/json</param>
....
<param name="root">myArray</param>
</result>