码迷,mamicode.com
首页 > Web开发 > 详细

freemark解析json

时间:2015-02-07 23:09:55      阅读:1228      评论:0      收藏:0      [点我收藏+]

标签:

<#assign text>

{"res":"0","msg":"OK","count":"3","pagenum":"1","pagesize":"1","totalpage":"1","userlist":[{"id":"1","name":"aa","sex":"男","age":"22"},{"id":"2","name":"bb","sex":"男","age":"21"},{"id":"3","name":"cc","sex":"女","age":"20"}]}

</#assign>

<#assign json=text?eval />

<#list json.userlist as item>

id:${item.id}, name:${item.name},sex:${item.sex}

</#list>


freemark解析json

标签:

原文地址:http://my.oschina.net/jiefalcon/blog/376433

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!