code: func encodeConfigMap(cm *v1.ConfigMap) (string, error) {
  	// json.Marshal sorts the keys in a stable order in the encoding
  	m := map[string]interface{}{"kind": "ConfigMap", "name": cm.Name, "data": cm.Data}
  	if len(cm.BinaryData) > 0 {
  		m["binaryData"] = cm.BinaryData
  	}
  	data, err := json.Marshal(m)
  	if err != nil {
  		return "", err
  	}
  	return string(data), nil
  }
docs: // encodeConfigMap encodes a ConfigMap.
  // Data, Kind, and Name are taken into account.