Classic ASP - Parse JSON XMLHTTP Return

后端 未结 1 1560
清酒与你
清酒与你 2021-01-28 07:26

I am having trouble finding a good way to parse the return I\'m getting from XMLHTTP. The return is JSON.

ASP Code used to GET JSON:

<%@ Language=VBSc         


        
1条回答
  •  说谎
    说谎 (楼主)
    2021-01-28 08:01

    You can look at aspjson for handling JSON with VBScript

    http://code.google.com/p/aspjson/

    You can also use Javascript as your classic asp server side scripting language, which would involve you rewriting your server http request in Javascript, but it would make the json part of the page much easier.

    You can even use VBS and JS in the same page, eg

    <%@ Language=javascript %>
    
    
    
    <% var resultcount = pageReturn.Titles.resultCount;
       var moreresources = pageReturn.Titles.moreResources;
    %>
    
    
    
    
    
    <%=resultcount%>, <%=moreresources%>
    
    
    

    0 讨论(0)
提交回复
热议问题