Preserve int data when unmarshalling for TPR
The Go json package converts all numbers to float64.
This exposes many of the int64 fields to corruption when marshalled back to json.
The json package provided by kubernetes also provides a way to defer conversion of numbers
(https://golang.org/pkg/encoding/json/#Decoder.UseNumber) and does the conversions to int or float.
This is also implemented in the custom json package. See:
(https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/json/json.go)
Fixes #30213
Update bazel build and add one more test case
Fix for gofmt error
Showing
Please
register
or
sign in
to comment