nodejs / nodejs/node

Regression Node 24.0.0+: parsing JSONL with U+2028 (line separator)/ U+2029 (paragraph separator)

Open
#60,606 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

readline repl
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the JSON.parse example on Node v24 and compare it with Node v23, focusing on the JSON parsing path and the handling of literal U+2028 and U+2029 inside strings. The issue mentions no source files or tests, so trace the relevant runtime or V8 entry point and add coverage showing that the input parses successfully without changing other JSON behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.