From 9692c843e7c3aa8e87084bcaba44030b93c301cc Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 23 Jan 2026 06:43:59 -0600 Subject: [PATCH] Refactor JSON serialization for WebSocket responses - Switched to using the compact JSON5 encoder for improved transport efficiency while preserving NaN/Infinity values in WebSocket subscription responses. - Updated comments for clarity on the changes made to the serialization process. --- src/web/api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/api.rs b/src/web/api.rs index 09bc11db..2790106c 100644 --- a/src/web/api.rs +++ b/src/web/api.rs @@ -554,8 +554,8 @@ async fn handle_websocket_subscription( }), }; - // Use json5 to preserve NaN/Infinity values - json5::to_string(&response)? + // Use compact JSON5 encoder for transport efficiency, preserves NaN/Infinity + json::to_string_compact(&response)? }; log::debug!("Sending batch of messages over WebSocket subscription");