code: func (r Resource) MarshalJSON() ([]byte, error) {
  	var ccResource struct {
  		FilePath    string   `json:"path,omitempty"`
  		Mode        string   `json:"mode,omitempty"`
  		Checksum    Checksum `json:"checksum"`
  		SizeInBytes int64    `json:"size_in_bytes"`
  	}
  
  	ccResource.FilePath = r.FilePath
  	ccResource.SizeInBytes = r.SizeInBytes
  	ccResource.Checksum = r.Checksum
  	ccResource.Mode = strconv.FormatUint(uint64(r.Mode), 8)
  	return json.Marshal(ccResource)
  }
docs: // MarshalJSON converts a resource into a Cloud Controller Resource.