1. 把java 对象列表转换为json对象数组,并转为字符串
str = "{/"lendperson/":/"李四/",/"lendcompany/":/"有限公司/",/"checkperson/":/"李四/",
/"lenddate/":/"2010-07-19T00:00:00/",/"lendcounts/":4,/"
passports/":[{/"passportid/":/"d/",/"name/":/"李豫川/",/"passporttype/":/"K/"},
{/"passportid/":/"K9051/",/"name/":/"李平/",/"passporttype/":/"K/"},
{/"passportid/":/"K90517/",/"name/":/"袁寒梅/",/"passporttype/":/"K/"},
{/"passportid/":/"K905199/",/"name/":/"贺明/",/"passporttype/":/"K/"}]}";
相关的jar包:
PS:关于json操作,这里再为大家推荐几款比较实用的json在线工具供大家参考使用:
在线JSON代码检验、检验、美化、格式化工具:
http://tools.VeVB.COm/code/json
JSON在线格式化工具:
http://tools.VeVB.COm/code/jsonformat
在线XML/JSON互相转换工具:
http://tools.VeVB.COm/code/xmljson
json代码在线格式化/美化/压缩/编辑/转换工具:
http://tools.VeVB.COm/code/jsoncodeformat
在线json压缩/转义工具:
http://tools.VeVB.COm/code/json_yasuo_trans
C语言风格/HTML/CSS/json代码格式化美化工具:
http://tools.VeVB.COm/code/ccode_html_css_json
新闻热点
疑难解答