【发布时间】:2012-05-28 10:29:47
【问题描述】:
我在 ASP Classic 中得到这样的 JSON 结果:
<script language="JScript" runat="server" src="json2.js"></script>
<%
Response.ContentType = "text/html"
Dim HttpReq
Dim Diamond
Set HttpReq = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")
HttpReq.open "GET", "http://url.com?id=" & Request.QueryString("id"), False
HttpReq.send
res = HttpReq.responseText
Set res = JSON.parse(res)
%>
有效。
假设 JSON 结果如下所示:
res = {
gallery: {
image1: { img: 'source url', thumb: 'source url' },
image2: { img: 'source url', thumb: 'source url' },
image3: { img: 'source url', thumb: 'source url' }
},
another_param1: 'foo',
another param2: 'bar',
...
}
然后我想迭代画廊对象,不是在 JScript 中,而是在 VBScript 中。
我该怎么做?
非常感谢您。
【问题讨论】:
标签: json asp-classic vbscript msxml