使用带有ASP的javascript json类

时间:2010-11-10 15:30:14

标签: json asp-classic vbscript

我想以JSON格式保存ASP会话数据。 我写了这段代码:

Dim piece_ : Set piece_ = JSON.parse("{""code"":"""",""quantity"":""0"",""printed"":""false"",""familles"":""[]""}")
      piece_.set "code", Collection(key).code
      piece_.set "quantity", Collection(key).quantity
      piece_.set "familles", Collection(key).familles_.ToJavaScript()

我的Set方法出错了。我的系统是WinXp Pro SP3 - IIS 5.出了什么问题? THX

1 个答案:

答案 0 :(得分:0)

尝试piece_.set("code",Collection(key).code))