【发布时间】:2019-07-04 15:27:55
【问题描述】:
我从 httprequest 获取 gzip 编码的 JSON 内容,但我不知道如何在 Lotus Script 中对其进行解码。
Set webRequest = Session.createhttprequest()
Call webRequest.Setheaderfield("cache-control", "no-cache")
Call webRequest.Setheaderfield("Connection", "keep-alive")
Call webRequest.Setheaderfield("Content-Type", "application/json")
Call webRequest.Setheaderfield("Authorization", "Bearer " + accessToken)
Call webRequest.Setheaderfield("Accept", "*/*")
Call webRequest.Setheaderfield("Host", "graph.microsoft.com")
Call webRequest.Setheaderfield("accept-encoding", "gzip, deflate")
ret = webRequest.Get(Url)
ForAll b In ret
responsJSON = responsJSON + Chr(b)
End ForAll
Set jsnav = session.CreateJSONNavigator(responsJSON)
我期望一个 JSON,但收到此错误消息“无法解析 JSON 字符串:无效值。Offset0”
【问题讨论】:
标签: json httprequest gzip lotusscript