summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/encoder/compiler.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-07-08 07:59:07 +0000
committerLibravatar GitHub <noreply@github.com>2024-07-08 07:59:07 +0000
commit43c480aec45e14f8a616db881e01fb009850bbc9 (patch)
tree24bb28334f55f05781d966cd1fbfa5bea8b029b0 /vendor/github.com/goccy/go-json/internal/encoder/compiler.go
parent[chore]: Bump golang.org/x/net from 0.26.0 to 0.27.0 (#3082) (diff)
downloadgotosocial-43c480aec45e14f8a616db881e01fb009850bbc9.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.72 to 7.0.73 (#3083)
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/encoder/compiler.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/encoder/compiler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/encoder/compiler.go b/vendor/github.com/goccy/go-json/internal/encoder/compiler.go
index 3ae39ba8c..37b7aa38e 100644
--- a/vendor/github.com/goccy/go-json/internal/encoder/compiler.go
+++ b/vendor/github.com/goccy/go-json/internal/encoder/compiler.go
@@ -480,7 +480,7 @@ func (c *Compiler) mapCode(typ *runtime.Type) (*MapCode, error) {
func (c *Compiler) listElemCode(typ *runtime.Type) (Code, error) {
switch {
- case c.isPtrMarshalJSONType(typ):
+ case c.implementsMarshalJSONType(typ) || c.implementsMarshalJSONType(runtime.PtrTo(typ)):
return c.marshalJSONCode(typ)
case !typ.Implements(marshalTextType) && runtime.PtrTo(typ).Implements(marshalTextType):
return c.marshalTextCode(typ)