mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
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.
This commit is contained in:
parent
7c6c4a0e85
commit
9692c843e7
1 changed files with 2 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue