diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index 6b7a075594..d2eaacddc8 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -33,7 +33,7 @@ func encodeValue(v reflect.Value, w *bytes.Buffer) error { // Special-cased types switch { case t == reflect.TypeFor[time.Time](): - data, err := json.Marshal(v.Interface().(time.Time)) + data, err := json.Marshal(v.Interface()) if err != nil { return err } @@ -41,7 +41,7 @@ func encodeValue(v reflect.Value, w *bytes.Buffer) error { return nil case t == reflect.TypeFor[json.RawMessage](): - data, err := json.Marshal(v.Interface().(json.RawMessage)) + data, err := json.Marshal(v.Interface()) if err != nil { return err }