Regression Node 24.0.0+: parsing JSONL with U+2028 (line separator)/ U+2029 (paragraph separator)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
Version
node v24.0.0+
What steps will reproduce the bug?
- Open a Node.js shell session (version 24.x or later).
- Run
JSON.parse('{"text":"Hello World"}')(The character between “Hello” and “World” is U+2028 (line separator). You can also use U+2029 (paragraph separator) instead.)
which will return with a Uncaught SyntaxError: Unexpected token ...
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Summary
Note: V8's "Subsume JSON" documentation explicitly discusses making these code points processable in JavaScript string literals (https://v8.dev/features/subsume-json). Given that, this change is surprising and breaks existing production pipelines.
What do you see instead?
After upgrading to Node v24.x, JSON.parse() now throws a SyntaxError when parsing JSON text that contains literal U+2028 (line separator) or U+2029 (paragraph separator) inside a string value. The same input parsed successfully on Node v23.x. This looks like a regression or at least an undocumented behaviour change in Node/V8.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das JSON.parse-Beispiel unter Node v24 zu reproduzieren und mit Node v23 zu vergleichen, wobei der Fokus auf dem JSON-Parsing-Pfad und der Behandlung der Literale U+2028 und U+2029 innerhalb von Strings liegt. Der Issue erwähnt keine Quelldateien oder Tests, also verfolge den relevanten Runtime- oder V8-Einstiegspunkt und füge eine Abdeckung hinzu, die zeigt, dass die Eingabe erfolgreich geparst wird, ohne anderes JSON-Verhalten zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, nodejs
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100