xref: /PHP-7.2/ext/json/tests/pass001.1.phpt (revision 2fd0b994)
1--TEST--
2JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
3--INI--
4serialize_precision=-1
5--SKIPIF--
6<?php
7if (!extension_loaded('json')) die('skip');
8if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
9?>
10--FILE--
11<?php
12/* Modified to test unescaped UNICODE as keys and values.
13 * Modified to test numbers with exponents without a decimal point.
14 * Modified to test empty string values.
15 * Modified to test a mix of integers and strings as keys.
16 */
17
18$test = "
19[
20    \"JSON Test Pattern pass1\",
21    {\"object with 1 member\":[\"array with 1 element\"]},
22    {},
23    [],
24    -42,
25    true,
26    false,
27    null,
28    {
29        \"integer\": 1234567890,
30        \"real\": -9876.543210,
31        \"e\": 0.123456789e-12,
32        \"E\": 1.234567890E+34,
33        \"\":  23456789012E666,
34        \"E no .\":  4E12,
35        \"zero\": 0,
36        \"one\": 1,
37        \"space\": \" \",
38        \"quote\": \"\\\"\",
39        \"backslash\": \"\\\\\",
40        \"controls\": \"\\b\\f\\n\\r\\t\",
41        \"slash\": \"/ & \\/\",
42        \"alpha\": \"abcdefghijklmnopqrstuvwyz\",
43        \"ALPHA\": \"ABCDEFGHIJKLMNOPQRSTUVWYZ\",
44        \"digit\": \"0123456789\",
45        \"special\": \"`1~!@#$%^&*()_+-={':[,]}|;.</>?\",
46        \"hex\": \"\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A\",
47        \"unicode\": \"\\u30d7\\u30ec\\u30b9\\u30ad\\u30c3\\u30c8\",
48        \"プレスキット\": \"プレスキット\",
49        \"empty_string\": \"\",
50        \"true\": true,
51        \"false\": false,
52        \"null\": null,
53        \"array\":[  ],
54        \"object\":{  },
55        \"123\":{\"456\":{\"abc\":{\"789\":\"def\",\"012\":[1,2,\"5\",500],\"ghi\":[1,2,\"five\",50,\"sixty\"]}}},
56        \"address\": \"50 St. James Street\",
57        \"url\": \"http://www.JSON.org/\",
58        \"comment\": \"// /* <!-- --\",
59        \"# -- --> */\": \" \",
60        \" s p a c e d \" :[1,2 , 3
61
62,
63
644 , 5        ,          6           ,7        ],
65        \"compact\": [1,2,3,4,5,6,7],
66        \"jsontext\": \"{\\\"object with 1 member\\\":[\\\"array with 1 element\\\"]}\",
67        \"quotes\": \"&#34; \\u0022 %22 0x22 034 &#x22;\",
68        \"\\/\\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?\"
69: \"A key can be any string\"
70    },
71    0.5 ,98.6
72,
7399.44
74,
75
761066
77
78
79,\"rosebud\"]
80";
81
82echo 'Testing: ' . $test . "\n";
83echo "DECODE: AS OBJECT\n";
84$obj = json_decode($test);
85var_dump($obj);
86echo "DECODE: AS ARRAY\n";
87$arr = json_decode($test, true);
88var_dump($arr);
89
90echo "ENCODE: FROM OBJECT\n";
91$obj_enc = json_encode($obj, JSON_PARTIAL_OUTPUT_ON_ERROR);
92echo $obj_enc . "\n";
93echo "ENCODE: FROM ARRAY\n";
94$arr_enc = json_encode($arr, JSON_PARTIAL_OUTPUT_ON_ERROR);
95echo $arr_enc . "\n";
96
97echo "DECODE AGAIN: AS OBJECT\n";
98$obj = json_decode($obj_enc);
99var_dump($obj);
100echo "DECODE AGAIN: AS ARRAY\n";
101$arr = json_decode($arr_enc, true);
102var_dump($arr);
103
104?>
105--EXPECTF--
106Testing:
107[
108    "JSON Test Pattern pass1",
109    {"object with 1 member":["array with 1 element"]},
110    {},
111    [],
112    -42,
113    true,
114    false,
115    null,
116    {
117        "integer": 1234567890,
118        "real": -9876.543210,
119        "e": 0.123456789e-12,
120        "E": 1.234567890E+34,
121        "":  23456789012E666,
122        "E no .":  4E12,
123        "zero": 0,
124        "one": 1,
125        "space": " ",
126        "quote": "\"",
127        "backslash": "\\",
128        "controls": "\b\f\n\r\t",
129        "slash": "/ & \/",
130        "alpha": "abcdefghijklmnopqrstuvwyz",
131        "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
132        "digit": "0123456789",
133        "special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
134        "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
135        "unicode": "\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8",
136        "プレスキット": "プレスキット",
137        "empty_string": "",
138        "true": true,
139        "false": false,
140        "null": null,
141        "array":[  ],
142        "object":{  },
143        "123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},
144        "address": "50 St. James Street",
145        "url": "http://www.JSON.org/",
146        "comment": "// /* <!-- --",
147        "# -- --> */": " ",
148        " s p a c e d " :[1,2 , 3
149
150,
151
1524 , 5        ,          6           ,7        ],
153        "compact": [1,2,3,4,5,6,7],
154        "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
155        "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
156        "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
157: "A key can be any string"
158    },
159    0.5 ,98.6
160,
16199.44
162,
163
1641066
165
166
167,"rosebud"]
168
169DECODE: AS OBJECT
170array(14) {
171  [0]=>
172  string(23) "JSON Test Pattern pass1"
173  [1]=>
174  object(stdClass)#%d (1) {
175    ["object with 1 member"]=>
176    array(1) {
177      [0]=>
178      string(20) "array with 1 element"
179    }
180  }
181  [2]=>
182  object(stdClass)#%d (0) {
183  }
184  [3]=>
185  array(0) {
186  }
187  [4]=>
188  int(-42)
189  [5]=>
190  bool(true)
191  [6]=>
192  bool(false)
193  [7]=>
194  NULL
195  [8]=>
196  object(stdClass)#%d (36) {
197    ["integer"]=>
198    int(1234567890)
199    ["real"]=>
200    float(-9876.54321)
201    ["e"]=>
202    float(1.23456789E-13)
203    ["E"]=>
204    float(1.23456789E+34)
205    [""]=>
206    float(INF)
207    ["E no ."]=>
208    float(4000000000000)
209    ["zero"]=>
210    int(0)
211    ["one"]=>
212    int(1)
213    ["space"]=>
214    string(1) " "
215    ["quote"]=>
216    string(1) """
217    ["backslash"]=>
218    string(1) "\"
219    ["controls"]=>
220    string(5) "
221
221	"
222    ["slash"]=>
223    string(5) "/ & /"
224    ["alpha"]=>
225    string(25) "abcdefghijklmnopqrstuvwyz"
226    ["ALPHA"]=>
227    string(25) "ABCDEFGHIJKLMNOPQRSTUVWYZ"
228    ["digit"]=>
229    string(10) "0123456789"
230    ["special"]=>
231    string(31) "`1~!@#$%^&*()_+-={':[,]}|;.</>?"
232    ["hex"]=>
233    string(17) "ģ䕧覫췯ꯍ"
234    ["unicode"]=>
235    string(18) "プレスキット"
236    ["プレスキット"]=>
237    string(18) "プレスキット"
238    ["empty_string"]=>
239    string(0) ""
240    ["true"]=>
241    bool(true)
242    ["false"]=>
243    bool(false)
244    ["null"]=>
245    NULL
246    ["array"]=>
247    array(0) {
248    }
249    ["object"]=>
250    object(stdClass)#%d (0) {
251    }
252    ["123"]=>
253    object(stdClass)#%d (1) {
254      ["456"]=>
255      object(stdClass)#%d (1) {
256        ["abc"]=>
257        object(stdClass)#%d (3) {
258          ["789"]=>
259          string(3) "def"
260          ["012"]=>
261          array(4) {
262            [0]=>
263            int(1)
264            [1]=>
265            int(2)
266            [2]=>
267            string(1) "5"
268            [3]=>
269            int(500)
270          }
271          ["ghi"]=>
272          array(5) {
273            [0]=>
274            int(1)
275            [1]=>
276            int(2)
277            [2]=>
278            string(4) "five"
279            [3]=>
280            int(50)
281            [4]=>
282            string(5) "sixty"
283          }
284        }
285      }
286    }
287    ["address"]=>
288    string(19) "50 St. James Street"
289    ["url"]=>
290    string(20) "http://www.JSON.org/"
291    ["comment"]=>
292    string(13) "// /* <!-- --"
293    ["# -- --> */"]=>
294    string(1) " "
295    [" s p a c e d "]=>
296    array(7) {
297      [0]=>
298      int(1)
299      [1]=>
300      int(2)
301      [2]=>
302      int(3)
303      [3]=>
304      int(4)
305      [4]=>
306      int(5)
307      [5]=>
308      int(6)
309      [6]=>
310      int(7)
311    }
312    ["compact"]=>
313    array(7) {
314      [0]=>
315      int(1)
316      [1]=>
317      int(2)
318      [2]=>
319      int(3)
320      [3]=>
321      int(4)
322      [4]=>
323      int(5)
324      [5]=>
325      int(6)
326      [6]=>
327      int(7)
328    }
329    ["jsontext"]=>
330    string(49) "{"object with 1 member":["array with 1 element"]}"
331    ["quotes"]=>
332    string(27) "&#34; " %22 0x22 034 &#x22;"
333    ["/\"쫾몾ꮘﳞ볚
334
334	`1~!@#$%^&*()_+-=[]{}|;:',./<>?"]=>
335    string(23) "A key can be any string"
336  }
337  [9]=>
338  float(0.5)
339  [10]=>
340  float(98.6)
341  [11]=>
342  float(99.44)
343  [12]=>
344  int(1066)
345  [13]=>
346  string(7) "rosebud"
347}
348DECODE: AS ARRAY
349array(14) {
350  [0]=>
351  string(23) "JSON Test Pattern pass1"
352  [1]=>
353  array(1) {
354    ["object with 1 member"]=>
355    array(1) {
356      [0]=>
357      string(20) "array with 1 element"
358    }
359  }
360  [2]=>
361  array(0) {
362  }
363  [3]=>
364  array(0) {
365  }
366  [4]=>
367  int(-42)
368  [5]=>
369  bool(true)
370  [6]=>
371  bool(false)
372  [7]=>
373  NULL
374  [8]=>
375  array(36) {
376    ["integer"]=>
377    int(1234567890)
378    ["real"]=>
379    float(-9876.54321)
380    ["e"]=>
381    float(1.23456789E-13)
382    ["E"]=>
383    float(1.23456789E+34)
384    [""]=>
385    float(INF)
386    ["E no ."]=>
387    float(4000000000000)
388    ["zero"]=>
389    int(0)
390    ["one"]=>
391    int(1)
392    ["space"]=>
393    string(1) " "
394    ["quote"]=>
395    string(1) """
396    ["backslash"]=>
397    string(1) "\"
398    ["controls"]=>
399    string(5) "
400
400	"
401    ["slash"]=>
402    string(5) "/ & /"
403    ["alpha"]=>
404    string(25) "abcdefghijklmnopqrstuvwyz"
405    ["ALPHA"]=>
406    string(25) "ABCDEFGHIJKLMNOPQRSTUVWYZ"
407    ["digit"]=>
408    string(10) "0123456789"
409    ["special"]=>
410    string(31) "`1~!@#$%^&*()_+-={':[,]}|;.</>?"
411    ["hex"]=>
412    string(17) "ģ䕧覫췯ꯍ"
413    ["unicode"]=>
414    string(18) "プレスキット"
415    ["プレスキット"]=>
416    string(18) "プレスキット"
417    ["empty_string"]=>
418    string(0) ""
419    ["true"]=>
420    bool(true)
421    ["false"]=>
422    bool(false)
423    ["null"]=>
424    NULL
425    ["array"]=>
426    array(0) {
427    }
428    ["object"]=>
429    array(0) {
430    }
431    [123]=>
432    array(1) {
433      [456]=>
434      array(1) {
435        ["abc"]=>
436        array(3) {
437          [789]=>
438          string(3) "def"
439          ["012"]=>
440          array(4) {
441            [0]=>
442            int(1)
443            [1]=>
444            int(2)
445            [2]=>
446            string(1) "5"
447            [3]=>
448            int(500)
449          }
450          ["ghi"]=>
451          array(5) {
452            [0]=>
453            int(1)
454            [1]=>
455            int(2)
456            [2]=>
457            string(4) "five"
458            [3]=>
459            int(50)
460            [4]=>
461            string(5) "sixty"
462          }
463        }
464      }
465    }
466    ["address"]=>
467    string(19) "50 St. James Street"
468    ["url"]=>
469    string(20) "http://www.JSON.org/"
470    ["comment"]=>
471    string(13) "// /* <!-- --"
472    ["# -- --> */"]=>
473    string(1) " "
474    [" s p a c e d "]=>
475    array(7) {
476      [0]=>
477      int(1)
478      [1]=>
479      int(2)
480      [2]=>
481      int(3)
482      [3]=>
483      int(4)
484      [4]=>
485      int(5)
486      [5]=>
487      int(6)
488      [6]=>
489      int(7)
490    }
491    ["compact"]=>
492    array(7) {
493      [0]=>
494      int(1)
495      [1]=>
496      int(2)
497      [2]=>
498      int(3)
499      [3]=>
500      int(4)
501      [4]=>
502      int(5)
503      [5]=>
504      int(6)
505      [6]=>
506      int(7)
507    }
508    ["jsontext"]=>
509    string(49) "{"object with 1 member":["array with 1 element"]}"
510    ["quotes"]=>
511    string(27) "&#34; " %22 0x22 034 &#x22;"
512    ["/\"쫾몾ꮘﳞ볚
513
513	`1~!@#$%^&*()_+-=[]{}|;:',./<>?"]=>
514    string(23) "A key can be any string"
515  }
516  [9]=>
517  float(0.5)
518  [10]=>
519  float(98.6)
520  [11]=>
521  float(99.44)
522  [12]=>
523  int(1066)
524  [13]=>
525  string(7) "rosebud"
526}
527ENCODE: FROM OBJECT
528["JSON Test Pattern pass1",{"object with 1 member":["array with 1 element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"":0,"E no .":4000000000000,"zero":0,"one":1,"space":" ","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ & \/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"`1~!@#$%^&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":{},"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50 St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!-- --","# -- --> *\/":" "," s p a c e d ":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 member\":[\"array with 1 element\"]}","quotes":"&#34; \" %22 0x22 034 &#x22;","\/\\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',.\/<>?":"A key can be any string"},0.5,98.6,99.44,1066,"rosebud"]
529ENCODE: FROM ARRAY
530["JSON Test Pattern pass1",{"object with 1 member":["array with 1 element"]},[],[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"":0,"E no .":4000000000000,"zero":0,"one":1,"space":" ","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ & \/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"`1~!@#$%^&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":[],"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50 St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!-- --","# -- --> *\/":" "," s p a c e d ":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 member\":[\"array with 1 element\"]}","quotes":"&#34; \" %22 0x22 034 &#x22;","\/\\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',.\/<>?":"A key can be any string"},0.5,98.6,99.44,1066,"rosebud"]
531DECODE AGAIN: AS OBJECT
532array(14) {
533  [0]=>
534  string(23) "JSON Test Pattern pass1"
535  [1]=>
536  object(stdClass)#%d (1) {
537    ["object with 1 member"]=>
538    array(1) {
539      [0]=>
540      string(20) "array with 1 element"
541    }
542  }
543  [2]=>
544  object(stdClass)#%d (0) {
545  }
546  [3]=>
547  array(0) {
548  }
549  [4]=>
550  int(-42)
551  [5]=>
552  bool(true)
553  [6]=>
554  bool(false)
555  [7]=>
556  NULL
557  [8]=>
558  object(stdClass)#%d (36) {
559    ["integer"]=>
560    int(1234567890)
561    ["real"]=>
562    float(-9876.54321)
563    ["e"]=>
564    float(1.23456789E-13)
565    ["E"]=>
566    float(1.23456789E+34)
567    [""]=>
568    int(0)
569    ["E no ."]=>
570    %s(4000000000000)
571    ["zero"]=>
572    int(0)
573    ["one"]=>
574    int(1)
575    ["space"]=>
576    string(1) " "
577    ["quote"]=>
578    string(1) """
579    ["backslash"]=>
580    string(1) "\"
581    ["controls"]=>
582    string(5) "
583
583	"
584    ["slash"]=>
585    string(5) "/ & /"
586    ["alpha"]=>
587    string(25) "abcdefghijklmnopqrstuvwyz"
588    ["ALPHA"]=>
589    string(25) "ABCDEFGHIJKLMNOPQRSTUVWYZ"
590    ["digit"]=>
591    string(10) "0123456789"
592    ["special"]=>
593    string(31) "`1~!@#$%^&*()_+-={':[,]}|;.</>?"
594    ["hex"]=>
595    string(17) "ģ䕧覫췯ꯍ"
596    ["unicode"]=>
597    string(18) "プレスキット"
598    ["プレスキット"]=>
599    string(18) "プレスキット"
600    ["empty_string"]=>
601    string(0) ""
602    ["true"]=>
603    bool(true)
604    ["false"]=>
605    bool(false)
606    ["null"]=>
607    NULL
608    ["array"]=>
609    array(0) {
610    }
611    ["object"]=>
612    object(stdClass)#%d (0) {
613    }
614    ["123"]=>
615    object(stdClass)#%d (1) {
616      ["456"]=>
617      object(stdClass)#%d (1) {
618        ["abc"]=>
619        object(stdClass)#%d (3) {
620          ["789"]=>
621          string(3) "def"
622          ["012"]=>
623          array(4) {
624            [0]=>
625            int(1)
626            [1]=>
627            int(2)
628            [2]=>
629            string(1) "5"
630            [3]=>
631            int(500)
632          }
633          ["ghi"]=>
634          array(5) {
635            [0]=>
636            int(1)
637            [1]=>
638            int(2)
639            [2]=>
640            string(4) "five"
641            [3]=>
642            int(50)
643            [4]=>
644            string(5) "sixty"
645          }
646        }
647      }
648    }
649    ["address"]=>
650    string(19) "50 St. James Street"
651    ["url"]=>
652    string(20) "http://www.JSON.org/"
653    ["comment"]=>
654    string(13) "// /* <!-- --"
655    ["# -- --> */"]=>
656    string(1) " "
657    [" s p a c e d "]=>
658    array(7) {
659      [0]=>
660      int(1)
661      [1]=>
662      int(2)
663      [2]=>
664      int(3)
665      [3]=>
666      int(4)
667      [4]=>
668      int(5)
669      [5]=>
670      int(6)
671      [6]=>
672      int(7)
673    }
674    ["compact"]=>
675    array(7) {
676      [0]=>
677      int(1)
678      [1]=>
679      int(2)
680      [2]=>
681      int(3)
682      [3]=>
683      int(4)
684      [4]=>
685      int(5)
686      [5]=>
687      int(6)
688      [6]=>
689      int(7)
690    }
691    ["jsontext"]=>
692    string(49) "{"object with 1 member":["array with 1 element"]}"
693    ["quotes"]=>
694    string(27) "&#34; " %22 0x22 034 &#x22;"
695    ["/\"쫾몾ꮘﳞ볚
696
696	`1~!@#$%^&*()_+-=[]{}|;:',./<>?"]=>
697    string(23) "A key can be any string"
698  }
699  [9]=>
700  float(0.5)
701  [10]=>
702  float(98.6)
703  [11]=>
704  float(99.44)
705  [12]=>
706  int(1066)
707  [13]=>
708  string(7) "rosebud"
709}
710DECODE AGAIN: AS ARRAY
711array(14) {
712  [0]=>
713  string(23) "JSON Test Pattern pass1"
714  [1]=>
715  array(1) {
716    ["object with 1 member"]=>
717    array(1) {
718      [0]=>
719      string(20) "array with 1 element"
720    }
721  }
722  [2]=>
723  array(0) {
724  }
725  [3]=>
726  array(0) {
727  }
728  [4]=>
729  int(-42)
730  [5]=>
731  bool(true)
732  [6]=>
733  bool(false)
734  [7]=>
735  NULL
736  [8]=>
737  array(36) {
738    ["integer"]=>
739    int(1234567890)
740    ["real"]=>
741    float(-9876.54321)
742    ["e"]=>
743    float(1.23456789E-13)
744    ["E"]=>
745    float(1.23456789E+34)
746    [""]=>
747    int(0)
748    ["E no ."]=>
749    %s(4000000000000)
750    ["zero"]=>
751    int(0)
752    ["one"]=>
753    int(1)
754    ["space"]=>
755    string(1) " "
756    ["quote"]=>
757    string(1) """
758    ["backslash"]=>
759    string(1) "\"
760    ["controls"]=>
761    string(5) "
762
762	"
763    ["slash"]=>
764    string(5) "/ & /"
765    ["alpha"]=>
766    string(25) "abcdefghijklmnopqrstuvwyz"
767    ["ALPHA"]=>
768    string(25) "ABCDEFGHIJKLMNOPQRSTUVWYZ"
769    ["digit"]=>
770    string(10) "0123456789"
771    ["special"]=>
772    string(31) "`1~!@#$%^&*()_+-={':[,]}|;.</>?"
773    ["hex"]=>
774    string(17) "ģ䕧覫췯ꯍ"
775    ["unicode"]=>
776    string(18) "プレスキット"
777    ["プレスキット"]=>
778    string(18) "プレスキット"
779    ["empty_string"]=>
780    string(0) ""
781    ["true"]=>
782    bool(true)
783    ["false"]=>
784    bool(false)
785    ["null"]=>
786    NULL
787    ["array"]=>
788    array(0) {
789    }
790    ["object"]=>
791    array(0) {
792    }
793    [123]=>
794    array(1) {
795      [456]=>
796      array(1) {
797        ["abc"]=>
798        array(3) {
799          [789]=>
800          string(3) "def"
801          ["012"]=>
802          array(4) {
803            [0]=>
804            int(1)
805            [1]=>
806            int(2)
807            [2]=>
808            string(1) "5"
809            [3]=>
810            int(500)
811          }
812          ["ghi"]=>
813          array(5) {
814            [0]=>
815            int(1)
816            [1]=>
817            int(2)
818            [2]=>
819            string(4) "five"
820            [3]=>
821            int(50)
822            [4]=>
823            string(5) "sixty"
824          }
825        }
826      }
827    }
828    ["address"]=>
829    string(19) "50 St. James Street"
830    ["url"]=>
831    string(20) "http://www.JSON.org/"
832    ["comment"]=>
833    string(13) "// /* <!-- --"
834    ["# -- --> */"]=>
835    string(1) " "
836    [" s p a c e d "]=>
837    array(7) {
838      [0]=>
839      int(1)
840      [1]=>
841      int(2)
842      [2]=>
843      int(3)
844      [3]=>
845      int(4)
846      [4]=>
847      int(5)
848      [5]=>
849      int(6)
850      [6]=>
851      int(7)
852    }
853    ["compact"]=>
854    array(7) {
855      [0]=>
856      int(1)
857      [1]=>
858      int(2)
859      [2]=>
860      int(3)
861      [3]=>
862      int(4)
863      [4]=>
864      int(5)
865      [5]=>
866      int(6)
867      [6]=>
868      int(7)
869    }
870    ["jsontext"]=>
871    string(49) "{"object with 1 member":["array with 1 element"]}"
872    ["quotes"]=>
873    string(27) "&#34; " %22 0x22 034 &#x22;"
874    ["/\"쫾몾ꮘﳞ볚
875
875	`1~!@#$%^&*()_+-=[]{}|;:',./<>?"]=>
876    string(23) "A key can be any string"
877  }
878  [9]=>
879  float(0.5)
880  [10]=>
881  float(98.6)
882  [11]=>
883  float(99.44)
884  [12]=>
885  int(1066)
886  [13]=>
887  string(7) "rosebud"
888}
889