Characters that will break a JSON.parse() that do not include chars within standard JSON-format.
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint($[i]))) {
JSON.parse(`{"test":"$[chr]"}`);
}
} catch {
log($[i]);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(0))) {
JSON.parse(`{"test":"0x00"}`);
}
} catch {
alert(0);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(1))) {
JSON.parse(`{"test":"0x01"}`);
}
} catch {
alert(1);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(2))) {
JSON.parse(`{"test":"0x02"}`);
}
} catch {
alert(2);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(3))) {
JSON.parse(`{"test":"0x03"}`);
}
} catch {
alert(3);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(4))) {
JSON.parse(`{"test":"0x04"}`);
}
} catch {
alert(4);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(5))) {
JSON.parse(`{"test":"0x05"}`);
}
} catch {
alert(5);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(6))) {
JSON.parse(`{"test":"0x06"}`);
}
} catch {
alert(6);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(7))) {
JSON.parse(`{"test":"0x07"}`);
}
} catch {
alert(7);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(8))) {
JSON.parse(`{"test":"0x08"}`);
}
} catch {
alert(8);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(11))) {
JSON.parse(`{"test":"0x0B"}`);
}
} catch {
alert(11);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(12))) {
JSON.parse(`{"test":"0x0C"}`);
}
} catch {
alert(12);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(14))) {
JSON.parse(`{"test":"0x0E"}`);
}
} catch {
alert(14);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(15))) {
JSON.parse(`{"test":"0x0F"}`);
}
} catch {
alert(15);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(16))) {
JSON.parse(`{"test":"0x10"}`);
}
} catch {
alert(16);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(17))) {
JSON.parse(`{"test":"0x11"}`);
}
} catch {
alert(17);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(18))) {
JSON.parse(`{"test":"0x12"}`);
}
} catch {
alert(18);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(19))) {
JSON.parse(`{"test":"0x13"}`);
}
} catch {
alert(19);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(20))) {
JSON.parse(`{"test":"0x14"}`);
}
} catch {
alert(20);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(21))) {
JSON.parse(`{"test":"0x15"}`);
}
} catch {
alert(21);
}
try {
standard_chars = [
`"`, `'`, `,`, `\n`, `\t`, `\r`, `}`, `{`, `\\`
];
if (!standard_chars.includes(String.fromCodePoint(22))) {
JSON.parse(`{"test":"0x16"}`);
}
} catch {
alert(22);
}