title: client-go: parse kubernetes json files to k8s structures
body: <p>i would like to parse kubernetes manifest file (json/yaml) and be able to convert them to k8s structures (to later on manipulate them)</p>
  
  <p>I know there is the NewYAMLOrJSONDecoder().Decode() function (<a href="https://github.com/kubernetes/apimachinery/blob/master/pkg/util/yaml/decoder.go" rel="noreferrer">https://github.com/kubernetes/apimachinery/blob/master/pkg/util/yaml/decoder.go</a>) to read a json/yaml file, but the next step is: how to convert them to k8s structure/type?</p>
  
  <p>i.e. if I read a yaml file with a Namespace object, how to convert it to a core/v1/namespace interface for example</p>
  
  <p>Regards,</p>