Skip to content

Commit

Permalink
chore: fix forward encoding cast (#1424)
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli authored May 7, 2024
1 parent c581cd8 commit d50a9f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go-runtime/encoding/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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
}
w.Write(data)
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
}
Expand Down

0 comments on commit d50a9f0

Please sign in to comment.