code: func (re RawExtension) MarshalJSON() ([]byte, error) {
  	if re.Raw == nil {
  		// TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which
  		// expect to call json.Marshal on arbitrary versioned objects (even those not in
  		// the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with
  		// kubectl get on objects not in the scheme needs to be updated to ensure that the
  		// objects that are not part of the scheme are correctly put into the right form.
  		if re.Object != nil {
  			return json.Marshal(re.Object)
  		}
  		return []byte("null"), nil
  	}
  	// TODO: Check whether ContentType is actually JSON before returning it.
  	return re.Raw, nil
  }
docs: // MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
  // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go