You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Network Inspector’s line-delimited JSON parsing logic does not handle blank lines correctly #3067
Network Inspector supports parsing multiple independent JSON objects separated by newlines in request and response bodies.
However, the line-delimited parsing fallback fails when:
Blank or whitespace-only lines appear between JSON objects.
The body ends with an LF or CRLF newline.
Without these blank lines or trailing newlines, the same JSON objects are successfully parsed into an array.
Expected behavior
The line-delimited parsing fallback should ignore blank and whitespace-only lines, including those produced by trailing newlines, and return the parsed objects as an array:
[
{ "a": 1 },
{ "b": 2 }
]
Malformed JSON on a nonblank line should still produce an error.
Actual behavior
Blank lines or trailing newlines cause the line-delimited parsing fallback to throw a SyntaxError.
The outer formatter catches and logs the exception. If no subsequent formatter succeeds, the body is returned as raw text instead of a structured array.
Affected components
The issue affects two formatters in Network Inspector:
JSON formatter: formats request and response bodies.
Activity