Class JSONObject
Based on properties added, this class is responsible for building a list of elements, and then generating a JSON string from those elements. This is more powerful than json_encode() in that it allows for adding arrays and objects as member variables to the JavaScript object.
Located in /class.jsonobject.php (line 26)
Protected method for looping the supplied attributes and turning them into a JSON string.
This method is called recursively when a value of array or JSONObject is found in the provided attributes array
- array $aAttributes: The array of elements to parse into JSON
- string $sStartChar: Optional; The starting character of this JSON attribute, either { for an object or [ for an array. Default: {
- string $sEndChar: The ending character of this JSON attribute, either } for an object or ] for an array. Default: }
Constructor. Currently does nothing.
Adds the specified key/value pair to our list of attributes in the JavaScript object.
key/value will be converted to { 'key': 'value } in JSON. The value parameter can be either a string, number (integer or float), array, or another JSONObject object. If an array is passed, it may also contain any of the previously listed types. Passed arrays and JSONObject objects will be recursively parsed.
- string $sKey: The key for this attribute of the JavaScript object
- mixed $xValue: The value for this attribute of the JavaScript object, either a string, number or another JSONObject object may be passed.
Protected method to return the elements in this JSONObject
Converts the object into a string by parsing the attributes array. This method calls the protected ConvertJSONAttributes method and returns its output
Documentation generated on Thu, 25 Feb 2010 15:59:40 -0500 by phpDocumentor 1.4.3

