and to use a node to do a good analysis, the node path-level positioning. The best thing about JSON is that when you use it you can simply declare the data string as an object, and you can easily invoke the members of the object. It also facilitates the use of JavaScript directly by the client to invoke the data string generated by the assembly.
As anyone who uses ASP knows, ASP can use two types of scripting engines, namely VBScript and JScript. I didn't know anything about JScript at the time I was studying, and if I did, I don't think I need to be so bothered right now. Use JScript conversion for JSON data before you can use it in VBScript. Fortunately, the two scripting engines have their own advantages and disadvantages, and I have been working with VBScript for more than two years, although not strong, but also have been accustomed to some of the use of this method, formed its own code output specifications.
JSON's official class file is handy, and it's a flexible definition of the JSON data format you want to output. I will be the official class document to tidy up a bit, it is adjusted to become a very convenient form of their own it!
Even adjusted JSON class file, code file address:
ASP JSON class file source code
Code usage Examples:
1. Create a JSON object
Copy Code code as follows:
Set cnodejson=new Json_cls
Cnodejson.quotedvars=false ' Whether the object name is quoted
Cnodejson ("ID") =1
Cnodejson ("Name") = "Cloud.l"
Cnodejson ("blogname") = "Cloud.l Blog"
Set cnodejson=nothing
2. Create another object in the object
Copy Code code as follows:
Set cnodejson=new Json_cls
Cnodejson.quotedvars=false ' Whether the object name is quoted
Cnodejson ("ID") =1
Cnodejson ("Name") = "Cloud.l"
Cnodejson ("blogname") = "Cloud.l Blog"
Set Cnodejson ("SiteList") =new json_cls
Cnodejson ("SiteList") ("Blog") = "Http://www.jb51.net"
Cnodejson ("SiteList") ("CSDN") = "http://hi.csdn.net/lingyun410"
Set cnodejson=nothing