From 3a972f58268f46a9277a8a55a8a80914ab5cd1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Silva?= <50581065+aacnsilva@users.noreply.github.com> Date: Sat, 18 Oct 2025 13:53:16 +0100 Subject: [PATCH] docs: fix incorrect programming language reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: António Silva <50581065+aacnsilva@users.noreply.github.com> --- apps/site/pages/en/learn/getting-started/websocket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/pages/en/learn/getting-started/websocket.md b/apps/site/pages/en/learn/getting-started/websocket.md index 018e9ffe36488..3d0fb6079fc9f 100644 --- a/apps/site/pages/en/learn/getting-started/websocket.md +++ b/apps/site/pages/en/learn/getting-started/websocket.md @@ -70,7 +70,7 @@ socket.addEventListener('message', event => { }); ``` -The `json` code above demonstrates sending and receiving [JSON](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/JSON) data, which is common in WebSocket applications. It uses [JSON.stringify()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) to convert JavaScript objects to JSON strings before sending. And converts the received string back to a JavaScript object with [JSON.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). Finally, it includes error handling for JSON parsing. +The `javascript` code above demonstrates sending and receiving [JSON](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting/JSON) data, which is common in WebSocket applications. It uses [JSON.stringify()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) to convert JavaScript objects to JSON strings before sending. And converts the received string back to a JavaScript object with [JSON.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse). Finally, it includes error handling for JSON parsing. This offers reduced dependency management and improved compatibility. Developers can avoid installing and maintaining additional WebSocket client libraries. The built-in implementation aligns with modern web standards, ensuring better interoperability. The enhancement focuses on the client-side of WebSocket communication, enabling Node.js to act as a WebSocket client.