From f762b3e6374d04ebcc94339bc040582817589b7f Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 18 Apr 2025 03:41:39 +0800 Subject: [PATCH] fix(json): check for custom marshaler for ptr type --- pkg/json/marshal.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/json/marshal.go b/pkg/json/marshal.go index cca9912..a41d932 100644 --- a/pkg/json/marshal.go +++ b/pkg/json/marshal.go @@ -192,6 +192,9 @@ func appendArray(v reflect.Value, buf []byte) []byte { } func appendPtrInterface(v reflect.Value, buf []byte) []byte { + if res, ok := appendWithCustomMarshaler(v, buf); ok { + return res + } return appendMarshal(v.Elem(), buf) }