This commit is contained in:
2024-08-05 12:06:31 +08:00
commit 4f17eb8bf6
10 changed files with 276 additions and 0 deletions

13
core/json.go Normal file
View File

@@ -0,0 +1,13 @@
package core
import (
"encoding/json"
)
func JsonToString(postData interface{}) string {
jsons, errs := json.Marshal(postData) //转换成JSON返回的是byte[]
if errs != nil {
return ""
}
return string(jsons)
}