Click to Rate and Give Feedback
JScript
JSON Object (Windows Scripting - JScript)

Updated: August 2008

Note:

This topic is prerelease documentation and is subject to change in future releases.

An intrinsic object that provides methods to convert JScript values to and from the JavaScript Object Notation (JSON) format. The stringify method serializes a JScript value to JSON text. The parse method deserializes JSON text to produce a JScript value.

JSON.[method]
Method

Required. Name of one of the methods of the JSON object.

You cannot create a JSON object by using the new operator. An error occurs if you try to do this. However, you can override or modify the JSON object.

The scripting engine creates the JSON object when the engine is loaded. All of its methods and properties are available to your script at all times.

To use the intrinsic JSON object, make sure that you do not override it with another JSON object that is defined in your script. You may need to modify existing script statements that detect the presence of a JSON object because those statements will evaluate differently. This is demonstrated in the following example.

if (!this.JSON) {
    // JSON object does not exist.
    }

In the previous example, !this.JSON evaluates to false in JScript Version 5.8 and above. Therefore, the code inside the if statement does not execute.

Reference

Other Resources

Date

History

Reason

August 2008

Added topic.

Information enhancement.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker