velocity解析jsonArray数组

来源:互联网 发布:外国人在中国用淘宝吗 编辑:程序博客网 时间:2024/06/06 08:48

velocity解析jsonArray数组:在velocity模板里面会把它当做map来解析

"benefitInfo":     [    #set($rows = $!inDataMap.get("beneficiaryInfo"))    #set($flag = "")    #foreach($item in $rows)    $!flag{    "insuredRelation": "$!item.get("favoree.relationshipWithApplicant")",    "docType": "$!item.get("favoree.idType")",    "sex": "$!item.get("favoree.sex")",    "customerFlag": "3",    "docNo": "$!item.get("favoree.idno")",    "birthDate": "$!item.get("favoree.birthday")",    "customerName":"$!item.get("favoree.name")",    "benifitPercent": "$!item.get("favoree.proportion")",            "phoneNo": "$!item.get("favoree.mobile")"    }    #set($flag = ",")    #end    ]






原创粉丝点击