修复序列化不支持map[interface{}]interfave{}的问题

This commit is contained in:
白茶清欢 2023-08-26 23:20:35 +08:00
parent 0c8a013bdb
commit 90f7ba5914
4 changed files with 4 additions and 4 deletions

View File

@ -334,7 +334,7 @@ func (n *normal) ToStruct(receiver interface{}) error {
// //
// Date : 20:44 2023/8/15 // Date : 20:44 2023/8/15
func (n *normal) ToString() string { func (n *normal) ToString() string {
mapData := n.GetAll() mapData := n.GetAllForMapKeyString()
byteData, _ := json.Marshal(mapData) byteData, _ := json.Marshal(mapData)
return string(byteData) return string(byteData)
} }

View File

@ -207,7 +207,7 @@ func (s *segment) ToStruct(receiver interface{}) error {
// //
// Date : 20:44 2023/8/15 // Date : 20:44 2023/8/15
func (s *segment) ToString() string { func (s *segment) ToString() string {
mapData := s.GetAll() mapData := s.GetAllForMapKeyString()
byteData, _ := json.Marshal(mapData) byteData, _ := json.Marshal(mapData)
return string(byteData) return string(byteData)
} }

View File

@ -276,7 +276,7 @@ func (s *syncMap) ToStruct(receiver interface{}) error {
// //
// Date : 20:44 2023/8/15 // Date : 20:44 2023/8/15
func (s *syncMap) ToString() string { func (s *syncMap) ToString() string {
mapData := s.GetAll() mapData := s.GetAllForMapKeyString()
byteData, _ := json.Marshal(mapData) byteData, _ := json.Marshal(mapData)
return string(byteData) return string(byteData)
} }

View File

@ -183,7 +183,7 @@ func (s *segmentSync) ToStruct(receiver interface{}) error {
// //
// Date : 20:44 2023/8/15 // Date : 20:44 2023/8/15
func (s *segmentSync) ToString() string { func (s *segmentSync) ToString() string {
mapData := s.GetAll() mapData := s.GetAllForMapKeyString()
byteData, _ := json.Marshal(mapData) byteData, _ := json.Marshal(mapData)
return string(byteData) return string(byteData)
} }