code: func (cr *CertificateRequest) UnmarshalJSON(data []byte) error {
  	var raw RawCertificateRequest
  	if err := json.Unmarshal(data, &raw); err != nil {
  		return err
  	}
  
  	csr, err := x509.ParseCertificateRequest(raw.CSR)
  	if err != nil {
  		return err
  	}
  
  	cr.CSR = csr
  	cr.Bytes = raw.CSR
  	return nil
  }
docs: // UnmarshalJSON provides an implementation for decoding CertificateRequest objects.