mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 17:15:58 +08:00
notification
This commit is contained in:
@@ -54,6 +54,11 @@ func StructToJsonString(param interface{}) string {
|
||||
return dataString
|
||||
}
|
||||
|
||||
func StructToJsonBytes(param interface{}) []byte {
|
||||
dataType, _ := json.Marshal(param)
|
||||
return dataType
|
||||
}
|
||||
|
||||
//The incoming parameter must be a pointer
|
||||
func JsonStringToStruct(s string, args interface{}) error {
|
||||
err := json.Unmarshal([]byte(s), args)
|
||||
|
||||
Reference in New Issue
Block a user