freemark解析json

<#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>


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。