Packagecom.esri.ags.utils
Classpublic class JSONUtil
InheritanceJSONUtil Inheritance Object

Generic class for encoding in to and decoding out of JSON strings.



Public Methods
 MethodDefined By
  
decode(string:String):Object
[static] Decodes a JSON string into a native object.
JSONUtil
  
encode(object:Object):String
[static] Encodes an object into a JSON string.
JSONUtil
Method Detail
decode()method
public static function decode(string:String):Object

Decodes a JSON string into a native object.

Parameters

string:String — The JSON string representing the object.

Returns
Object — A native object.

Throws
Error — If input string cannot be parsed.
encode()method 
public static function encode(object:Object):String

Encodes an object into a JSON string. This will call toJSON() on objects that implement IJSONSupport.

Parameters

object:Object — The object to create a JSON string for.

Returns
String — the JSON string representing the object.

See also