[英] Any good libraries for parsing JSON in Classic ASP?
我已经在classic ASP(VBScript)中找到了无数用于generating个JSON的库,但我在parsing个中没有找到任何库.
我想要一些可以传递JSON字符串并返回某种类型的VBScript对象(数组、脚本、字典等)的东西
我已经在classic ASP(VBScript)中找到了无数用于generating个JSON的库,但我在parsing个中没有找到任何库.
我想要一些可以传递JSON字符串并返回某种类型的VBScript对象(数组、脚本、字典等)的东西
Keep in mind that Classic ASP includes JScript as well as VBScript. Interestingly, you can parse JSON using JScript and use the resulting objects directly in VBScript.
Therefore, it is possible to use the canonical https://github.com/douglascrockford/JSON-js/blob/master/json2.js in server-side code with zero modifications.
Of course, if your JSON includes any arrays, these will remain JScript arrays when parsing is complete. You can access the contents of the JScript array from VBScript using dot notation.
<%@Language="VBScript" %>
<%
Option Explicit
%>
<script language="JScript" runat="server" src='path/to/json2.js'></script>
<%
Dim myJSON
myJSON = Request.Form("myJSON") // "[ 1, 2, 3 ]"
Set myJSON = JSON.parse(myJSON) // [1,2,3]
Response.Write(myJSON) // 1,2,3
Response.Write(myJSON.[0]) // 1
Response.Write(myJSON.[1]) // 2
Response.Write(myJSON.[2]) // 3
%>
如何为 System.Text.Json.JsonSerializer 全局设置默认选项?
ASP.NET Core 3.0 [FromBody] 字符串内容返回“无法将 JSON 值转换为 System.String.”
.NET CORE 3 升级 CORS 和 Json(cycle) XMLHttpRequest 错误
为什么 Boost 属性树 write_json 将所有内容都保存为字符串?有可能改变吗?
TypeError:“float32”类型的对象不是 JSON 可序列化的
如何在 JSON Postgres 数据类型列中搜索特定字符串?
在没有 ASP.NET Core 的情况下将 IConfigurationSection 绑定到复杂对象
react 路由 v^4.0.0 未捕获类型错误:无法读取未定义的属性“位置”