How to use asp json files

Source: Internet
Author: User

In addition, it is necessary to analyze a node and locate the Node path at a level. The biggest benefit of JSON is that you can easily call all the members of an object by declaring the data string as an object. It is also convenient to use JavaScript directly on the client. Program The data string generated by the client.

Anyone who uses ASP knows that ASP can use two types of script engines: VBScript and JScript. I didn't even know JScript when I first learned it. If I knew it, I don't think it is necessary for me to use JScript to convert JSON data so that I can use it in VBScript. Fortunately, the two script engines have their own advantages and disadvantages, and I have been using VBScript for more than two years. Although I am not strong enough, I am used to some of the following methods, formed your ownCodeOutput specification.

JSON officially written class files are quite convenient. You can flexibly define and output the desired JSON data format. I sorted out the official class files and changed them to a convenient format!
The URL of the adjusted JSON file:

Source code of asp json files

Code example:
1. Create a JSON objectCopy codeThe Code is as follows: Set cnodejson = new json_cls
Cnodejson. quotedvars = false' whether the object name is enclosed by quotation marks
Cnodejson ("ID") = 1
Cnodejson ("name") = "cloud. L"
Cnodejson ("blogname") = "cloud. l blog"
Set cnodejson = nothing

2. Create another object in the objectCopy codeThe Code is as follows: Set cnodejson = new json_cls
Cnodejson. quotedvars = false' whether the object name is enclosed by quotation marks
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.