From 566c5ee3a28d87e2669fbb4d473d363d2b290286 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Fri, 25 Nov 2022 13:40:46 +0900 Subject: [PATCH] doc: fix actual result of example is different in stream 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). --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 92f77f61a9d28d..1726635b55b9d4 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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