code: func (img *Image) MarshalJSON() ([]byte, error) {
  	type MarshalImage Image
  
  	pass1, err := json.Marshal(MarshalImage(*img))
  	if err != nil {
  		return nil, err
  	}
  
  	var c map[string]*json.RawMessage
  	if err := json.Unmarshal(pass1, &c); err != nil {
  		return nil, err
  	}
  	return json.Marshal(c)
  }
docs: // MarshalJSON serializes the image to JSON. It sorts the top-level keys so
  // that JSON that's been manipulated by a push/pull cycle with a legacy
  // registry won't end up with a different key order.