feat: add performance statistics to UI protocol
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIWebSocketServer.ts
index 42162d16556c47cec0c0b7805f77fc36d3ac7f99..0dce52cace77c8cb27a67220f9bcb8788687fe55 100644 (file)
@@ -14,6 +14,7 @@ import {
 } from '../../types/index.js'
 import {
   Constants,
+  JSONStringifyWithMapSupport,
   getWebSocketCloseEventStatusString,
   isNotEmptyString,
   logPrefix,
@@ -120,7 +121,7 @@ export class UIWebSocketServer extends AbstractUIServer {
       if (this.hasResponseHandler(responseId)) {
         const ws = this.responseHandlers.get(responseId) as WebSocket
         if (ws.readyState === WebSocket.OPEN) {
-          ws.send(JSON.stringify(response))
+          ws.send(JSONStringifyWithMapSupport(response))
         } else {
           logger.error(
             `${this.logPrefix(