This commit is contained in:
2024-11-21 14:28:15 +08:00
parent a56574ff65
commit b7890f7fd0
2 changed files with 12 additions and 1 deletions

10
map.go
View File

@ -227,3 +227,13 @@ func (m *Map) MarshalJSON() ([]byte, error) {
}
return serialize.JSON.MarshalForByte(mapData)
}
// ToString 序列化成字符串
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:24 2024/11/21
func (m *Map) ToString() string {
byteData, _ := m.MarshalJSON()
return string(byteData)
}