Ai
1 Star 0 Fork 0

Coder/gox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
json.go 310 Bytes
一键复制 编辑 原始数据 按行查看 历史
Coder 提交于 2025-03-18 11:54 +08:00 . message type
package message
import "encoding/json"
func Json(v any) CustomMessage {
return &jsonMessage{v: v}
}
type jsonMessage struct {
v any
}
func (bean *jsonMessage) Decode(e []byte) error {
return json.Unmarshal(e, bean.v)
}
func (bean *jsonMessage) Encode() ([]byte, error) {
return json.Marshal(bean.v)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/andyxt/gox.git
git@gitee.com:andyxt/gox.git
andyxt
gox
gox
v1.0.51

搜索帮助