From 4e1b7b9df72f9c298f199b6cec446dbcfdd70c6b Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 01 Jun 2021 17:10:42 +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