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: nodejs#45619
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
  • Loading branch information
deokjinkim authored and ErickWendel committed Nov 30, 2022
1 parent 5b1c8a1 commit fd1c3ce
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 fd1c3ce

Please sign in to comment.