--TEST-- JSON (http://www.crockford.com/JSON/JSON_checker/test/fail*.json) --SKIPIF-- --FILE-- --EXPECT-- Testing: "A JSON payload should be an object or array, not a string." AS OBJECT string(58) "A JSON payload should be an object or array, not a string." AS ARRAY string(58) "A JSON payload should be an object or array, not a string." Testing: ["Unclosed array" AS OBJECT string(17) "["Unclosed array"" AS ARRAY string(17) "["Unclosed array"" Testing: {unquoted_key: "keys must be quoted} AS OBJECT string(36) "{unquoted_key: "keys must be quoted}" AS ARRAY string(36) "{unquoted_key: "keys must be quoted}" Testing: ["extra comma",] AS OBJECT string(16) "["extra comma",]" AS ARRAY string(16) "["extra comma",]" Testing: ["double extra comma",,] AS OBJECT string(24) "["double extra comma",,]" AS ARRAY string(24) "["double extra comma",,]" Testing: [ , "<-- missing value"] AS OBJECT string(26) "[ , "<-- missing value"]" AS ARRAY string(26) "[ , "<-- missing value"]" Testing: ["Comma after the close"], AS OBJECT string(26) "["Comma after the close"]," AS ARRAY string(26) "["Comma after the close"]," Testing: ["Extra close"]] AS OBJECT string(16) "["Extra close"]]" AS ARRAY string(16) "["Extra close"]]" Testing: {"Extra comma": true,} AS OBJECT string(22) "{"Extra comma": true,}" AS ARRAY string(22) "{"Extra comma": true,}" Testing: {"Extra value after close": true} "misplaced quoted value" AS OBJECT string(58) "{"Extra value after close": true} "misplaced quoted value"" AS ARRAY string(58) "{"Extra value after close": true} "misplaced quoted value"" Testing: {"Illegal expression": 1 + 2} AS OBJECT string(29) "{"Illegal expression": 1 + 2}" AS ARRAY string(29) "{"Illegal expression": 1 + 2}" Testing: {"Illegal invocation": alert()} AS OBJECT string(31) "{"Illegal invocation": alert()}" AS ARRAY string(31) "{"Illegal invocation": alert()}" Testing: {"Numbers cannot have leading zeroes": 013} AS OBJECT string(43) "{"Numbers cannot have leading zeroes": 013}" AS ARRAY string(43) "{"Numbers cannot have leading zeroes": 013}" Testing: {"Numbers cannot be hex": 0x14} AS OBJECT string(31) "{"Numbers cannot be hex": 0x14}" AS ARRAY string(31) "{"Numbers cannot be hex": 0x14}" Testing: ["Illegal backslash escape: \x15"] AS OBJECT string(34) "["Illegal backslash escape: \x15"]" AS ARRAY string(34) "["Illegal backslash escape: \x15"]" Testing: ["Illegal backslash escape: \'"] AS OBJECT string(32) "["Illegal backslash escape: \'"]" AS ARRAY string(32) "["Illegal backslash escape: \'"]" Testing: ["Illegal backslash escape: \017"] AS OBJECT string(34) "["Illegal backslash escape: \017"]" AS ARRAY string(34) "["Illegal backslash escape: \017"]" Testing: [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] AS OBJECT string(266) "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]" AS ARRAY string(266) "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]" Testing: {"Missing colon" null} AS OBJECT string(22) "{"Missing colon" null}" AS ARRAY string(22) "{"Missing colon" null}" Testing: {"Double colon":: null} AS OBJECT string(23) "{"Double colon":: null}" AS ARRAY string(23) "{"Double colon":: null}" Testing: {"Comma instead of colon", null} AS OBJECT string(32) "{"Comma instead of colon", null}" AS ARRAY string(32) "{"Comma instead of colon", null}" Testing: ["Colon instead of comma": false] AS OBJECT string(33) "["Colon instead of comma": false]" AS ARRAY string(33) "["Colon instead of comma": false]" Testing: ["Bad value", truth] AS OBJECT string(20) "["Bad value", truth]" AS ARRAY string(20) "["Bad value", truth]" Testing: ['single quote'] AS OBJECT string(16) "['single quote']" AS ARRAY string(16) "['single quote']" --UEXPECT-- Testing: "A JSON payload should be an object or array, not a string." AS OBJECT unicode(58) "A JSON payload should be an object or array, not a string." AS ARRAY unicode(58) "A JSON payload should be an object or array, not a string." Testing: ["Unclosed array" AS OBJECT unicode(17) "["Unclosed array"" AS ARRAY unicode(17) "["Unclosed array"" Testing: {unquoted_key: "keys must be quoted} AS OBJECT unicode(36) "{unquoted_key: "keys must be quoted}" AS ARRAY unicode(36) "{unquoted_key: "keys must be quoted}" Testing: ["extra comma",] AS OBJECT unicode(16) "["extra comma",]" AS ARRAY unicode(16) "["extra comma",]" Testing: ["double extra comma",,] AS OBJECT unicode(24) "["double extra comma",,]" AS ARRAY unicode(24) "["double extra comma",,]" Testing: [ , "<-- missing value"] AS OBJECT unicode(26) "[ , "<-- missing value"]" AS ARRAY unicode(26) "[ , "<-- missing value"]" Testing: ["Comma after the close"], AS OBJECT unicode(26) "["Comma after the close"]," AS ARRAY unicode(26) "["Comma after the close"]," Testing: ["Extra close"]] AS OBJECT unicode(16) "["Extra close"]]" AS ARRAY unicode(16) "["Extra close"]]" Testing: {"Extra comma": true,} AS OBJECT unicode(22) "{"Extra comma": true,}" AS ARRAY unicode(22) "{"Extra comma": true,}" Testing: {"Extra value after close": true} "misplaced quoted value" AS OBJECT unicode(58) "{"Extra value after close": true} "misplaced quoted value"" AS ARRAY unicode(58) "{"Extra value after close": true} "misplaced quoted value"" Testing: {"Illegal expression": 1 + 2} AS OBJECT unicode(29) "{"Illegal expression": 1 + 2}" AS ARRAY unicode(29) "{"Illegal expression": 1 + 2}" Testing: {"Illegal invocation": alert()} AS OBJECT unicode(31) "{"Illegal invocation": alert()}" AS ARRAY unicode(31) "{"Illegal invocation": alert()}" Testing: {"Numbers cannot have leading zeroes": 013} AS OBJECT unicode(43) "{"Numbers cannot have leading zeroes": 013}" AS ARRAY unicode(43) "{"Numbers cannot have leading zeroes": 013}" Testing: {"Numbers cannot be hex": 0x14} AS OBJECT unicode(31) "{"Numbers cannot be hex": 0x14}" AS ARRAY unicode(31) "{"Numbers cannot be hex": 0x14}" Testing: ["Illegal backslash escape: \x15"] AS OBJECT unicode(34) "["Illegal backslash escape: \x15"]" AS ARRAY unicode(34) "["Illegal backslash escape: \x15"]" Testing: ["Illegal backslash escape: \'"] AS OBJECT unicode(32) "["Illegal backslash escape: \'"]" AS ARRAY unicode(32) "["Illegal backslash escape: \'"]" Testing: ["Illegal backslash escape: \017"] AS OBJECT unicode(34) "["Illegal backslash escape: \017"]" AS ARRAY unicode(34) "["Illegal backslash escape: \017"]" Testing: [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] AS OBJECT unicode(266) "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]" AS ARRAY unicode(266) "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]" Testing: {"Missing colon" null} AS OBJECT unicode(22) "{"Missing colon" null}" AS ARRAY unicode(22) "{"Missing colon" null}" Testing: {"Double colon":: null} AS OBJECT unicode(23) "{"Double colon":: null}" AS ARRAY unicode(23) "{"Double colon":: null}" Testing: {"Comma instead of colon", null} AS OBJECT unicode(32) "{"Comma instead of colon", null}" AS ARRAY unicode(32) "{"Comma instead of colon", null}" Testing: ["Colon instead of comma": false] AS OBJECT unicode(33) "["Colon instead of comma": false]" AS ARRAY unicode(33) "["Colon instead of comma": false]" Testing: ["Bad value", truth] AS OBJECT unicode(20) "["Bad value", truth]" AS ARRAY unicode(20) "["Bad value", truth]" Testing: ['single quote'] AS OBJECT unicode(16) "['single quote']" AS ARRAY unicode(16) "['single quote']"