mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Explicitly exclude unmarshaled fields for custom-marshaled types from standard JSON handling
This commit is contained in:
parent
12ceec47aa
commit
5f9a042284
@ -240,7 +240,7 @@ type ValidationRule struct {
|
|||||||
// JSON represents any valid JSON value.
|
// JSON represents any valid JSON value.
|
||||||
// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
|
// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
|
||||||
type JSON struct {
|
type JSON struct {
|
||||||
Raw []byte `protobuf:"bytes,1,opt,name=raw"`
|
Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
||||||
|
@ -240,7 +240,7 @@ type ValidationRule struct {
|
|||||||
// JSON represents any valid JSON value.
|
// JSON represents any valid JSON value.
|
||||||
// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
|
// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
|
||||||
type JSON struct {
|
type JSON struct {
|
||||||
Raw []byte `protobuf:"bytes,1,opt,name=raw"`
|
Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
// OpenAPISchemaType is used by the kube-openapi generator when constructing
|
||||||
|
@ -123,7 +123,7 @@ type Unknown struct {
|
|||||||
// Raw will hold the complete serialized object which couldn't be matched
|
// Raw will hold the complete serialized object which couldn't be matched
|
||||||
// with a registered type. Most likely, nothing should be done with this
|
// with a registered type. Most likely, nothing should be done with this
|
||||||
// except for passing it through the system.
|
// except for passing it through the system.
|
||||||
Raw []byte `protobuf:"bytes,2,opt,name=raw"`
|
Raw []byte `json:"-" protobuf:"bytes,2,opt,name=raw"`
|
||||||
// ContentEncoding is encoding used to encode 'Raw' data.
|
// ContentEncoding is encoding used to encode 'Raw' data.
|
||||||
// Unspecified means no encoding.
|
// Unspecified means no encoding.
|
||||||
ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"`
|
ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"`
|
||||||
|
Loading…
Reference in New Issue
Block a user