优化数组字符串处理

This commit is contained in:
白茶清欢 2025-03-02 21:33:16 +08:00
parent c757e551a8
commit d5622fe0ca

View File

@ -55,8 +55,8 @@ func (at *Array[Bt]) IsNil() bool {
func (at *Array[Bt]) ToStringSlice() []string {
list := make([]string, 0)
for _, item := range at.value {
byteData, _ := json.Marshal(item)
list = append(list, strings.Trim(string(byteData), "\""))
str := AnyDataType(item).ToString().Value()
list = append(list, str)
}
return list
}