asp json

<script language="JScript" runat="Server">
function toObject(json) {
    eval("var o=" + json);
    return o;
}
</script>

<%
Dim json
json = "[{'uid':'1','username':'abc','email':'123@163.com'},{'uid':'2','username':'abc2','email':'1234@163.com'}]"
Set json = toObject(json)
 
for each obj in json
Response.Write obj.uid & "<br/>"
Response.Write obj.username & "<br/>"
Response.Write obj.email & "<br/>"
next
Set json = Nothing
%>

posted @ 2013-06-23 21:47  streetpasser  阅读(235)  评论(0编辑  收藏  举报