From e33cca903c00396ddedff2a9a6deeb09ab10f474 Mon Sep 17 00:00:00 2001 From: Denis Zinovyev Date: Tue, 15 Jun 2021 21:40:11 +0300 Subject: [PATCH] fix too many arguments in call to MarshalJSON --- gen/encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/encoder.go b/gen/encoder.go index 74c530f..ed6d6ad 100644 --- a/gen/encoder.go +++ b/gen/encoder.go @@ -269,7 +269,7 @@ func (g *Generator) genTypeEncoderNoCheck(t reflect.Type, in string, tags fieldT fmt.Fprintln(g.out, ws+"if m, ok := "+in+".(easyjson.Marshaler); ok {") fmt.Fprintln(g.out, ws+" m.MarshalEasyJSON(out)") fmt.Fprintln(g.out, ws+"} else {") - fmt.Fprintln(g.out, ws+in+".MarshalJSON(out)") + fmt.Fprintln(g.out, ws+in+".MarshalJSON()") fmt.Fprintln(g.out, ws+"}") } else { return fmt.Errorf("interface type %v not supported: only interface{} and interfaces that implement json or easyjson Marshaling are allowed", t)