比如说我有以下数据需要传输到Action页面
在A页面通过form表单的post提交数据到Action
goods[0][code]=3
goods[0][name]=fds
goods[0][price]=1000
goods[1][code]=3
goods[1][name]=fdsfd
goods[1][price]=2000
那么现在的问题是在Action如何才能获取这一系列的数值?
高洛峰2017-04-18 09:05:11
Submit the form content into a JSON string on the client, such as:
{
goods: [
good: {
code: 3,
name: 'fds',
price: 1000
},
...
]
}
Use Jackson or GSON on the server side to restore the JSON string to an object.