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

上一篇:tyvj1012 P1012 - 火柴棒等式 ——暴力枚举


下一篇:STM32建立project库函数方法