From 2e57ef64fed2e9c12cc7d673c31624a06bc0efe2 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 04 Jun 2021 10:02:41 +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