首页 > 编程知识 正文

jsonobject遍历多级(java将json字符串转换成数组)

时间:2023-05-04 04:32:02 阅读:69635 作者:2761

iwouldliketoextractthevaluesfromjsonarray.jsonarrayhasnnumberofrowsandcolumns。

动态表单=动态表单. bindfromrequest (;

动态动态=动态格式. get (;

//List list=new ArrayList (;

//List iterate=new ArrayList (;

String data=dynamic.getData ().get ) (content ).toString );

try {

zzdmpjsonarray=newzz DMP (数据;

for(intI=0; i jsonArray.length (; I ) {

}catch(JSONexceptione ) {

//todo auto-generated catch块

e .打印堆栈跟踪(;

}

its结果As Follows。

iwouldliketoextractonebyonevaluesandassignittovariable.for example 1001432,05-KalenJi-p 1229,kalen Ji,2,2014-11-11

you can done using this code,

This is the perfect code,

//put your json in data string

zzdmpjsonarray=newzz DMP (数据;

IF (JSon阵列!=null jsonArray.length ()0) {

for(intI=0; i jsonArray.length (; I ) {

zzdmpchildjsonarray=JSON array.optzzdmp (I;

if(childjsonarray!=nullchildjsonarray.length(0) {

for(intj=0; j childJsonArray.length (; j ) {

}

}

}

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。