package utils import "encoding/json" func JsonEncode(data interface{}) (string, error) { jsons, err := json.Marshal(data) return string(jsons), err }