java后台得到list数据,list里面包含对象数据,怎么转换成json数据格式?
PHP中文网
PHP中文网 2017-04-17 17:38:55
0
3
264

java得到的list:[Goods [id=60, name=123123], Goods [id=61, name=123123]]
怎么转化成json数据格式。
例如这样:[{id: 60, name: '123'}, {id: 40, name: '123'}];

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
洪涛

fastjson

巴扎黑

fastjson is a good choice

小葫芦

This is the download address of the package (login required): http://download.csdn.net/download/t_worm...;
Initialization: String jsonString = JSON.toJSONString(list); #🎜 🎜#Friends in need can try it out.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!