From ffd586b4b93665e1bf90df114e5eda71b47f20a8 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 08 Jun 2021 16:24:37 +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