func (p Payload) MarshalJSON() ([]byte, error) {
	return json.Marshal(p.Map())
}
MarshalJSON returns []byte, error
package apns2
import "encoding/json"
type Payload struct {
	Alert Alert
	Badge uint
	Sound string
	ContentAvailable bool
	Category string
}
func (p *Payload) Map() map[string]interface{} {
	payload := make(map[string]interface{}, 4)
	if !p.Alert.isValid() {
		if p.Alert.isSimpleForm() {
			payload["alert"] = p.Alert.Body
		} else {
			payload["alert"] = p.Alert
		}
	}
	if p.Badge != 0 {
		payload["badge"] = p.Badge
	}
	if p.Sound != "" {
		payload["sound"] = p.Sound
	}
	if p.ContentAvailable {
		payload["content-available"] = 1
	}
	if p.Category != "" {
		payload["category"] = p.Category
	}
	return map[string]interface{}{"aps": payload}
}