Class jJson

Description

object which encode or decode a php variable to or from JSON

Located in /utils/jJson.class.php (line 19)


	
			
Method Summary
mixed decode (string $str)
mixed encode (mixed $var)
void jJSON ([int $use = 0])
Methods
decode (line 60)

decodes a JSON string into appropriate variable

  • return: number, boolean, string, array, or object corresponding to given JSON input string. Note that decode() always returns strings in ASCII or UTF-8 format!
mixed decode (string $str)
  • string $str: JSON-formatted string
encode (line 47)

encodes an arbitrary variable into JSON format

  • return: JSON string representation of input var or an error if a problem occurs
mixed encode (mixed $var)
  • mixed $var: any number, boolean, string, array, or object to be encoded. if var is a string, note that encode() always expects it to be in ASCII or UTF-8 format!
jJSON (line 34)

constructs a new JSON instance

void jJSON (int $use)
  • int $use: object behavior flags; combine with boolean-OR possible values:
    • SERVICES_JSON_STRICT_TYPE: (default) strict convertion
    • SERVICES_JSON_LOOSE_TYPE: loose typing. "{...}" syntax creates associative arrays instead of objects in decode().

Documentation generated on Thu, 19 Sep 2013 00:06:06 +0200 by phpDocumentor 1.4.3