diff options
| author | KubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com> | 2024-07-11 10:16:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-11 10:16:54 +0800 |
| commit | 530bedfb151c4d1ac226c14a332fde59c7f2266c (patch) | |
| tree | 3ec616656344be9013c26929e03347bb12c35c82 /vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go | |
| parent | Merge pull request #5545 from luomengY/automated-cherry-pick-of-#5467-upstrea... (diff) | |
| parent | update k8s version to v1.27.15 in CI (diff) | |
| download | kubeedge-530bedfb151c4d1ac226c14a332fde59c7f2266c.tar.gz | |
Merge pull request #5699 from Shelley-BaoYue/bump-k8s-v1.27.15
Bump k8s from v1.27.7 to v1.27.15
Diffstat (limited to 'vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go')
| -rw-r--r-- | vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go index 7387c8e39..524ea057c 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go @@ -280,6 +280,17 @@ func decodeNonProtoField(d *json.Decoder, unmarshaler protojson.UnmarshalOptions return nil } if rv.Kind() == reflect.Slice { + if rv.Type().Elem().Kind() == reflect.Uint8 { + var sl []byte + if err := d.Decode(&sl); err != nil { + return err + } + if sl != nil { + rv.SetBytes(sl) + } + return nil + } + var sl []json.RawMessage if err := d.Decode(&sl); err != nil { return err |
