// GetObjectMeta calls GetObjectMetaWithOptions without returning unknown field paths. func GetObjectMeta(obj map[string]interface{ … } type ObjectMetaOptions … // GetObjectMetaWithOptions does conversion of JSON to ObjectMeta. // It first tries json.Unmarshal into a metav1.ObjectMeta // type. If that does not work and opts.DropMalformedFields is true, it does field-by-field best-effort conversion // throwing away fields which lead to errors. // If opts.ReturnedUnknownFields is true, it will UnmarshalStrict instead, returning the paths of any unknown fields // it encounters (i.e. paths returned as strict errs from UnmarshalStrict) func GetObjectMetaWithOptions(obj map[string]interface{ … } // SetObjectMeta writes back ObjectMeta into a JSON data structure. func SetObjectMeta(obj map[string]interface{ … }