From e3de2835a9717d5cd955dd5ad23e01ea0e39f669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 13 Oct 2024 19:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E5=8F=96=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- array.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/array.go b/array.go index 6127d94..5dc3443 100644 --- a/array.go +++ b/array.go @@ -149,9 +149,9 @@ func (at *Array[Bt]) ToStringWithSplit(split string) StringResult { // Author : go_developer@163.com<白茶清欢> // // Date : 19:00 2024/10/13 -func (at *Array[Bt]) ExtraField(fieldName string) *Array[any] { +func (at *Array[Bt]) ExtraField(fieldName string) String { if at.IsNil() { - return ArrayType[any]([]any{}) + return String("[]") } byteData, _ := json.Marshal(at.value) res := make([]any, 0) @@ -162,5 +162,5 @@ func (at *Array[Bt]) ExtraField(fieldName string) *Array[any] { res = append(res, itemValue.Value()) } } - return ArrayType(res) + return String(ArrayType(res).ToString().Value) }