1 Star 0 Fork 0

llakcs / agile-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
json.go 393 Bytes
一键复制 编辑 原始数据 按行查看 历史
llakcs 提交于 2024-01-31 16:56 . 第一次提交
package json
import (
"encoding/json"
"gitee.com/llakcs/agile-go/encoding"
)
func init() {
encoding.RegisterCodec(JsonCodec{})
}
type JsonCodec struct{}
func (JsonCodec) Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
func (JsonCodec) Unmarshal(data []byte, v interface{}) error {
return json.Unmarshal(data, v)
}
func (JsonCodec) Name() string {
return "json"
}
1
https://gitee.com/llakcs/agile-go.git
git@gitee.com:llakcs/agile-go.git
llakcs
agile-go
agile-go
v1.2.0

搜索帮助