code: func (j *JSONPathPrinter) PrintObj(obj runtime.Object, w io.Writer) error {
  	// we use reflect.Indirect here in order to obtain the actual value from a pointer.
  	// we need an actual value in order to retrieve the package path for an object.
  	// using reflect.Indirect indiscriminately is valid here, as all runtime.Objects are supposed to be pointers.
  	if InternalObjectPreventer.IsForbidden(reflect.Indirect(reflect.ValueOf(obj)).Type().PkgPath()) {
  		return fmt.Errorf(InternalObjectPrinterErr)
  	}
  
  	var queryObj interface{} = obj
  	if unstructured, ok := obj.(runtime.Unstructured); ok {
  		queryObj = unstructured.UnstructuredContent()
  	} else {
  		data, err := json.Marshal(obj)
  		if err != nil {
  			return err
  		}
  		queryObj = map[string]interface{}{}
  		if err := json.Unmarshal(data, &queryObj); err != nil {
  			return err
  		}
  	}
  
  	if err := j.JSONPath.Execute(w, queryObj); err != nil {
  		buf := bytes.NewBuffer(nil)
  		fmt.Fprintf(buf, "Error executing template: %v. Printing more information for debugging the template:\n", err)
  		fmt.Fprintf(buf, "\ttemplate was:\n\t\t%v\n", j.rawTemplate)
  		fmt.Fprintf(buf, "\tobject given to jsonpath engine was:\n\t\t%#v\n\n", queryObj)
  		return fmt.Errorf("error executing jsonpath %q: %v\n", j.rawTemplate, buf.String())
  	}
  	return nil
  }
docs: // PrintObj formats the obj with the JSONPath Template.