code: func (e External) MarshalJSON() ([]byte, error) {
  	if e.Name == "" {
  		return []byte(fmt.Sprintf("%v", e.External)), nil
  	}
  	return []byte(fmt.Sprintf(`{"name": %q}`, e.Name)), nil
  }
docs: // MarshalJSON makes External implement json.Marshaller