• Home
  • Raw
  • Download

Lines Matching refs:stringify

18 print ( JSON . stringify ( "" ) === '""' )
20 print ( JSON . stringify ( normal_string ) == '"asdasd"' )
22 print ( JSON . stringify ( format_characters ) == '"\\ba\\fs\\nd\\ra\\tsd"' )
24 print ( JSON . stringify ( ctl_string ) == '"asd\\u001fasd"' )
26 print ( JSON . stringify ( escpad_string ) == '"\\"asdasd"' )
27 print ( JSON . stringify ( true ) === 'true' )
28 print ( JSON . stringify ( "foo" ) === '"foo"' )
29 print ( JSON . stringify ( null ) === 'null' )
30 print ( JSON . stringify ( RegExp ) === undefined )
31 print ( JSON . stringify ( new Number ( 1 ) ) === '1' )
32 print ( JSON . stringify ( new Boolean ( true ) ) === 'true' )
33 print ( JSON . stringify ( new String ( "foo" ) ) === '"foo"' )
35 print ( JSON . stringify ( empty_object ) == '{}' )
38 print ( JSON . stringify ( empty_object ) == '{}' )
40 print ( JSON . stringify ( p_object ) == '{"a":1,"b":true,"c":"foo","d":null}' )
42 print ( JSON . stringify ( o_object ) == '{"a":1,"b":true,"c":"foo"}' )
45 print ( JSON . stringify ( parent ) == '{"a":true,"b":{"a":1,"b":"\\nfoo"},"c":null}' )
49 try { JSON . stringify ( recursive_object )
54 print ( JSON . stringify ( empty_array ) == '[]' )
56 print ( JSON . stringify ( array ) == '[null]' )
58 print ( JSON . stringify ( p_array ) == '[1,true,"foo",null,null]' )
60 print ( JSON . stringify ( o_array ) == '[1,true,"foo"]' )
63 print ( JSON . stringify ( parent ) == '[true,[1,"\\nfoo",null],null]' )
67 try { JSON . stringify ( recursive_array )
72 print ( JSON . stringify ( object ) == '{"a":1,"b":[1,true,{"a":"foo"}]}' )
74 print ( JSON . stringify ( object ) === '{"a":[1],"b":{}}' )
76 print ( JSON . stringify ( array ) == '[1,{"a":2,"b":true,"c":[3]}]' )
85 print ( JSON . stringify ( object , replacer_function ) == '{"a":"FOO","b":"JSON","c":3}' )
87 print ( JSON . stringify ( object , filter ) == '{"a":"JSON","b":"JSON"}' )
88 print ( JSON . stringify ( [ ] , [ "" , 4 ] ) === '[]' )
95 } try { JSON . stringify ( object , replacer_thrower )
100 print ( JSON . stringify ( object , 3 ) == '{"a":2}' )
101 print ( JSON . stringify ( object , 0 ) == '{"a":2}' )
102 print ( JSON . stringify ( object , 0 ) == '{"a":2}' )
103 print ( JSON . stringify ( object , undefined ) == '{"a":2}' )
104 print ( JSON . stringify ( object , 0 ) == '{"a":2}' )
105 print ( JSON . stringify ( object , new Boolean ( 0 ) ) == '{"a":2}' )
106 print ( JSON . stringify ( object , 0 , "asd\u20400123456789" ) == '{\nasd⁀012345"a": 2\n}' )
107 print ( JSON . stringify ( object , 0 , 100 ) == '{\n "a": 2\n}' )
108 print ( JSON . stringify ( object , 0 , - 5 ) == '{"a":2}' )
110 print ( JSON . stringify ( array , 0 , " " ) == '[\n 2\n]' )
111 print ( JSON . stringify ( array , 0 , "asd" ) == '[\nasd2\n]' )
112 print ( JSON . stringify ( array , 0 , "asd0123456789" ) == '[\nasd01234562\n]' )
113 print ( JSON . stringify ( array , 0 , "asd\u20400123456789" ) == '[\nasd⁀0123452\n]' )
114 print ( JSON . stringify ( array , 0 , 100 ) == '[\n 2\n]' )
115 print ( JSON . stringify ( array , 0 , - 5 ) == '[2]' )
117 print ( JSON . stringify ( nested_object , 0 , 2 ) == '{\n "a": 2,\n "b": {\n "c": 1,\n "d"…