The JSON class provides static methods for parsing and stringifying JSON data.
parse(text:String, reviver:Function = null): Object:- Converts a internal JSON string into an ActionScript object.
revivercan be used to transform values during parsing.
stringify(value:Object, replacer:* = null, space:* = null): String:- Converts an ActionScript value to a JSON string.
replacercan be an array of property names or a function.spacecan be a Number or String for indentation (pretty-printing).
Classes can define a toJSON(k:String):* method to customize how they are serialized by JSON.stringify().
- Supported in Flash Player 11+ and AIR 3.0+.
- For older versions, developers typically used the
com.adobe.serialization.json.JSONlibrary.