您好,感谢先进,这是我第一次和Json在一起,我很失落。基本上我需要实现的是调用url(例如www.whatever.com?radius=300&type=sale),此调用的响应被格式化为json
["pisos, áticos, estudios, dúplex, casas o chalets, de todos los precios, de todos los tamaños, con 0 dormitorios o más",
{
"total" : 1,
"elementList":[
{ "abrAddress" : "cervantes, 36",
"address" : "cervantes, 36",
"agency" : true,
"agentLogo" : "www.idealista.com/publicidad/P00015394.gif",
"bathrooms" : 0,
"condition" : "obra nueva",
}
],
"actualPage" : 1,
"totalPages" : 1,
"itemsPerPage" : 20
},
{ "latitude" : 40.415914000000001,
"longitude" : -3.696148}
]
然后我必须处理这些数据。
我在一个经典的asp文件中做了所有这些,基本上我不知道如何开始拨打电话或者无论如何,我已经谷歌了,我似乎找不到一个例子,他们得到了来自网址的json数据等 提前谢谢!
答案 0 :(得分:0)
尝试这样:
Set objRequest = Server.createobject("MSXML2.XMLHTTP.3.0")
objRequest.open "POST", url here, False
objRequest.setRequestHeader "Content-Type", "application/json; charset=UTF-8"
objRequest.setRequestHeader "CharSet", "utf-8"
objRequest.setRequestHeader "SOAPAction", url here
objRequest.send JSONstr
set objJSONDoc = nothing
set objResult = nothing