JSON

asp json类库解析json字符串

字号+ 作者:H5之家 来源:H5之家 2017-07-31 12:00 我要评论( )

!--#include virtual=/aspJSON1.17.asp --%Set oJSON = New aspJSONWith oJSON.data.Add familyName, SmithCreate value.Add familyMembers, oJSON.Collection()With oJSON.data(familyMembers).Add 0, oJSON.Collection()Create objectWith .item(0).Add fi

<!--#include virtual="/aspJSON1.17.asp" --> <% Set oJSON = New aspJSON With oJSON.data .Add "familyName", "Smith" 'Create value .Add "familyMembers", oJSON.Collection() With oJSON.data("familyMembers") .Add 0, oJSON.Collection() 'Create object With .item(0) .Add "firstName", "John" .Add "age", 41 End With .Add 1, oJSON.Collection() With .item(1) .Add "firstName", "Suzan" .Add "age", 38 .Add "interests", oJSON.Collection() 'Create array With .item("interests") .Add 0, "Reading" .Add 1, "Tennis" .Add 2, "Painting" End With End With .Add 2, oJSON.Collection() With .item(2) .Add "firstName", "John Jr." .Add "age", 2.5 End With End With End With Response.Write oJSON.JSONoutput() 'Return json string %>

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
网友点评