From e9b82575bf16026c60bbf5ee4e42ca74358eb36c Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 02 Jun 2021 11:27:46 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/netty/common/NettyTools.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/netty/common/NettyTools.java b/src/main/java/com/xcong/excoin/netty/common/NettyTools.java
index 413888b..dd13d4e 100644
--- a/src/main/java/com/xcong/excoin/netty/common/NettyTools.java
+++ b/src/main/java/com/xcong/excoin/netty/common/NettyTools.java
@@ -31,4 +31,8 @@
     public static TextWebSocketFrame webSocketBytes(String msg) {
         return new TextWebSocketFrame(msg);
     }
+
+    public static TextWebSocketFrame webSocketJson(Object object) {
+        return webSocketBytes(JSONObject.toJSONString(object));
+    }
 }

--
Gitblit v1.9.1