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 <kohei.ueno119@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
  • Loading branch information
deokjinkim authored and danielleadams committed Dec 29, 2022
1 parent 3f3ec59 commit e7895cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
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 e7895cd

Please sign in to comment.