diff options
author | SVN Migration <svn@php.net> | 2006-06-02 16:15:59 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2006-06-02 16:15:59 +0000 |
commit | 5b1558c01fa9c4c1ba4c918a51a59f2e670e954c (patch) | |
tree | 8351842d1fd00eaf3d22b13ad23a2b02cf07d766 /ext/json/README | |
parent | 653007cea0bb87ccd39a746c7867eb10d907fd81 (diff) | |
download | php-git-BEFORE_NEW_OUTPUT_API.tar.gz |
This commit was manufactured by cvs2svn to create tagBEFORE_NEW_OUTPUT_API
'BEFORE_NEW_OUTPUT_API'.
Diffstat (limited to 'ext/json/README')
-rw-r--r-- | ext/json/README | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/ext/json/README b/ext/json/README deleted file mode 100644 index d680b0c592..0000000000 --- a/ext/json/README +++ /dev/null @@ -1,76 +0,0 @@ -json 1.2.0 -========== - -This extension implements the JavaScript Object Notation (JSON) -data-interchange format as specified in [0]. - -Two functions are implemented: encoding and decoding. The decoding -is handled by a parser based on JSON_checker[1] by Douglas Crockford. - - -Function overview ------------------ - - string json_encode ( mixed value ) - -json_encode returns a string containing the JSON representation of value. -value can be any type except a resource. - - mixed json_decode ( string json, [bool assoc] ) - -json_decode takes a JSON string and converts it into a PHP variable. -When assoc is given, and evaluates to TRUE, json_decode() will return -any objects as associative arrays. - - -Example usage -------------- - -$arr = array("a"=>1,"b"=>2,"c"=>3,"d"=>4,"e"=>5); -echo json_encode($arr); - ----> {"a":1,"b":2,"c":3,"d":4,"e":5} - -$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; -var_dump(json_decode($json)); - ----> object(stdClass)#1 (5) { - ["a"]=> - int(1) - ["b"]=> - int(2) - ["c"]=> - int(3) - ["d"]=> - int(4) - ["e"]=> - int(5) - } - -$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; -var_dump(json_decode($json, true)); - ----> array(5) { - ["a"]=> - int(1) - ["b"]=> - int(2) - ["c"]=> - int(3) - ["d"]=> - int(4) - ["e"]=> - int(5) - } - - -Authors -------- - -Omar Kilani <omar@php.net> - - ---- - -[0] http://www.crockford.com/JSON/draft-jsonorg-json-00.txt -[1] http://www.crockford.com/JSON/JSON_checker/ |