Fix unsafe json construction for scale.go and codec_check.go
Fix unsafe json construction for scale.go and codec_check.go

Kubernetes-commit: ef469a740a24b87f501606c897ea849d6478e162

kubernetes/apimachinery