This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus/pkg/nex/encode.go
2024-11-04 00:12:17 +08:00

17 lines
245 B
Go

package nex
import (
"github.com/goccy/go-json"
)
func EncodeMap(data any) []byte {
raw, _ := json.Marshal(data)
return raw
}
func DecodeMap(raw []byte) map[string]any {
var out map[string]any
_ = json.Unmarshal(raw, &out)
return out
}