我在 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 中。
我怎样才能做到这一点?
非常感谢您提前。