| [ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
Converts to and from JSON format. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. This feature can also be found in Python. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, TCL, and many others. These properties make JSON an ideal data-interchange language.
| Author: | Michal Migurski <mike-json@teczno.com> |
| Author: | Matt Knapp |
| Author: | Brett Stimmerman |
| Copyright: | 2005 Michal Migurski |
| License: | http://www.opensource.org/licenses/bsd-license.php |
| Poids: | 758 lignes (32 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
TJSON:: (11 méthodes):
__construct()
encode()
enc()
name_value()
reduce_string()
decode()
dec()
utf8_to_unicode()
unicode_to_utf8()
utf8_to_utf16be()
utf16be_to_utf8()
| __construct($use=self::JSON_STRICT_TYPE) X-Ref |
| constructs a new JSON instance param: int $use object behavior: when encoding or decoding, |
| encode($var) X-Ref |
| encodes an arbitrary variable into JSON format param: mixed $var any number, boolean, string, array, or object to be encoded. return: string JSON string representation of input var |
| enc($var) X-Ref |
| encodes an arbitrary variable into JSON format, alias for encode() param: mixed $var any number, boolean, string, array, or object to be encoded. return: string JSON string representation of input var |
| name_value($name, $value) X-Ref |
| Pas de description |
| reduce_string($str) X-Ref |
| reduce a string by removing leading and trailing comments and whitespace param: $str string string value to strip of comments and whitespace return: string string value stripped of comments and whitespace |
| decode($str) X-Ref |
| decodes a JSON string into appropriate variable param: string $str JSON-formatted string return: mixed number, boolean, string, array, or object |
| dec($var) X-Ref |
| decodes a JSON string into appropriate variable; alias for decode() param: string $str JSON-formatted string return: mixed number, boolean, string, array, or object |
| utf8_to_unicode( &$str ) X-Ref |
| This function returns any UTF-8 encoded text as a list of Unicode values: author: Scott Michael Reynen <scott@randomchaos.com> |
| unicode_to_utf8( &$str ) X-Ref |
| This function converts a Unicode array back to its UTF-8 representation author: Scott Michael Reynen <scott@randomchaos.com> |
| utf8_to_utf16be(&$str, $bom = false) X-Ref |
| UTF-8 to UTF-16BE conversion. Maybe really UCS-2 without mb_string due to utf8_to_unicode limits |
| utf16be_to_utf8(&$str) X-Ref |
| UTF-8 to UTF-16BE conversion. Maybe really UCS-2 without mb_string due to utf8_to_unicode limits |
| Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |