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