code: func (t *TagMap) UnmarshalJSON(data []byte) error {
  	m := map[string]string{}
  	if err := json.Unmarshal(data, &m); err != nil {
  		return err
  	}
  
  	if len(m) == 0 {
  		*t = nil
  		return nil
  	}
  
  	tm := make(TagMap, len(m))
  	for k, v := range m {
  		if err := types.ValidateTag(k, v); err != nil {
  			return err
  		}
  		tm[k] = v
  	}
  
  	*t = tm
  	return nil
  }
docs: // UnmarshalJSON implements the json.Unmarshaler interface.