code: func (cgroup *CgroupResource) UnmarshalJSON(b []byte) error {
  	temp := cgroupResourceJSON{}
  
  	if err := json.Unmarshal(b, &temp); err != nil {
  		return err
  	}
  
  	cgroup.cgroupRoot = temp.CgroupRoot
  	cgroup.cgroupMountPath = temp.CgroupMountPath
  	cgroup.resourceSpec = temp.LinuxSpec
  	if temp.DesiredStatus != nil {
  		cgroup.SetDesiredStatus(resourcestatus.ResourceStatus(*temp.DesiredStatus))
  	}
  	if temp.KnownStatus != nil {
  		cgroup.SetKnownStatus(resourcestatus.ResourceStatus(*temp.KnownStatus))
  	}
  	return nil
  }
docs: // UnmarshalJSON unmarshals CgroupResource object using duplicate struct CgroupResourceJSON