News for hackers. Stuff that matters.
Re:Unlocking the Power of JSON Patch by bsimpson on Friday October 18, 2024 @03:20PM (#41882582)
Is there any legal JSON that's not legal JavaScript?

If not, it's fair to say it's a subset.

Re:Unlocking the Power of JSON Patch by tubthumper8 on Friday October 18, 2024 @03:38PM (#41882750)
It is a subset as of JavaScript edition ES2019, when JavaScript strings are now allowed to contain U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. Prior to ES2019, that was the only known example of legal JSON that was not legal JavaScript
Re:Unlocking the Power of JSON Patch by fanf2 on Friday October 18, 2024 @03:46PM (#41882831)
JavaScript used to forbid U+2028 line separator and U+2029 paragraph separator in string literals, but JavaScript now allows them for compatibility with JSON.

The remaining wrinkle is different handling of "__proto__"