From 4166b7ae433d4dd815a5914f6a0fe0ae7280b9be Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 01 Jun 2021 15:18:49 +0800
Subject: [PATCH] modiyf

---
 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