From 14bf9ee7665cf043d70d6f08f4f06d0a7042c293 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 28 May 2021 14:58:25 +0800
Subject: [PATCH] 20210528

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