Skip to content

Commit

Permalink
doc: fix actual result of example is different in stream
Browse files Browse the repository at this point in the history
Error message of JSON.parse may be changed with current node version.
For reference, actual result is same with previous node
version(v16.18.1).

PR-URL: #45619
Reviewed-By: Kohei Ueno <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
  • Loading branch information
deokjinkim authored and danielleadams committed Jan 4, 2023
1 parent 2aa3aae commit 7755b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ server.listen(1337);
// $ curl localhost:1337 -d "\"foo\""
// string
// $ curl localhost:1337 -d "not json"
// error: Unexpected token o in JSON at position 1
// error: Unexpected token 'o', "not json" is not valid JSON
```

[`Writable`][] streams (such as `res` in the example) expose methods such as
Expand Down

0 comments on commit 7755b1f

Please sign in to comment.