Name Date Size #Lines LOC

..05-Dec-2019-

tests/H05-Dec-2019-

CREDITSH A D05-Dec-201933 32

JSON_parser.cH A D05-Dec-201923.8 KiB743565

JSON_parser.hH A D05-Dec-2019778 3426

READMEH A D05-Dec-20191.5 KiB7754

config.m4H A D05-Dec-2019495 1612

config.w32H A D05-Dec-2019274 117

json.cH A D05-Dec-201914.6 KiB623467

json.dspH A D05-Dec-20195 KiB136114

package.xmlH A D05-Dec-20194.2 KiB153149

php_json.hH A D05-Dec-20192.3 KiB7333

utf8_decode.cH A D05-Dec-20194.8 KiB18080

utf8_decode.hH A D05-Dec-2019466 1914

utf8_to_utf16.cH A D05-Dec-20191.8 KiB5726

utf8_to_utf16.hH A D05-Dec-201991 41

README

1json 1.2.0
2==========
3
4This extension implements the JavaScript Object Notation (JSON)
5data-interchange format as specified in [0].
6
7Two functions are implemented: encoding and decoding. The decoding
8is handled by a parser based on JSON_checker[1] by Douglas Crockford.
9
10
11Function overview
12-----------------
13
14    string json_encode ( mixed value )
15
16json_encode returns a string containing the JSON representation of value.
17value can be any type except a resource.
18
19    mixed json_decode ( string json, [bool assoc] )
20
21json_decode takes a JSON string and converts it into a PHP variable.
22When assoc is given, and evaluates to TRUE, json_decode() will return
23any objects as associative arrays.
24
25
26Example usage
27-------------
28
29$arr = array("a"=>1,"b"=>2,"c"=>3,"d"=>4,"e"=>5);
30echo json_encode($arr);
31
32---> {"a":1,"b":2,"c":3,"d":4,"e":5}
33
34$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
35var_dump(json_decode($json));
36
37---> object(stdClass)#1 (5) {
38        ["a"]=>
39        int(1)
40        ["b"]=>
41        int(2)
42        ["c"]=>
43        int(3)
44        ["d"]=>
45        int(4)
46        ["e"]=>
47        int(5)
48     }
49
50$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
51var_dump(json_decode($json, true));
52
53---> array(5) {
54        ["a"]=>
55        int(1)
56        ["b"]=>
57        int(2)
58        ["c"]=>
59        int(3)
60        ["d"]=>
61        int(4)
62        ["e"]=>
63        int(5)
64     }
65
66
67Authors
68-------
69
70Omar Kilani <omar@php.net>
71
72
73---
74
75[0] http://www.crockford.com/JSON/draft-jsonorg-json-00.txt
76[1] http://www.crockford.com/JSON/JSON_checker/
77