code: func (tc BoulderTypeConverter) ToDb(val interface{}) (interface{}, error) {
  	switch t := val.(type) {
  	case core.AcmeIdentifier, []core.Challenge, []string, [][]int:
  		jsonBytes, err := json.Marshal(t)
  		if err != nil {
  			return nil, err
  		}
  		return string(jsonBytes), nil
  	case jose.JSONWebKey:
  		jsonBytes, err := t.MarshalJSON()
  		if err != nil {
  			return "", err
  		}
  		return string(jsonBytes), nil
  	case core.AcmeStatus:
  		return string(t), nil
  	case core.OCSPStatus:
  		return string(t), nil
  	default:
  		return val, nil
  	}
  }
docs: // ToDb converts a Boulder object to one suitable for the DB representation.