func (d *Delta) MarshalJSON() ([]byte, error) {
	b, err := json.Marshal(d.Entity)
	if err != nil {
		return nil, err
	}
	var buf bytes.Buffer
	buf.WriteByte('[')
	c := "change"
	if d.Removed {
		c = "remove"
	}
	fmt.Fprintf(&buf, "%q,%q,", d.Entity.EntityId().Kind, c)
	buf.Write(b)
	buf.WriteByte(']')
	return buf.Bytes(), nil
}
// MarshalJSON implements json.Marshaler.
MarshalJSON implements json.Marshaler.
// MarshalJSON implements json . Marshaler .
func (d *Delta) MarshalJSON() ([]byte, error) {
	b, err := json.Marshal(d.Entity)
	if err != nil {
		return nil, err
	}
	var buf bytes.Buffer
	buf.WriteByte('[')
	c := "change"
	if d.Removed {
		c = "remove"
	}
	fmt.Fprintf(&buf, "%q,%q,", d.Entity.EntityId().Kind, c)
	buf.Write(b)
	buf.WriteByte(']')
	return buf.Bytes(), nil
}
func ( d * Delta ) MarshalJSON ( ) ( [ ] byte , error ) { b , err := json . Marshal ( d . Entity ) if err != nil { return nil , err } var buf bytes . Buffer buf . WriteByte ( '[' ) c := " " if d . Removed { c = " " } fmt . Fprintf ( & buf , " " , d . Entity . EntityId ( ) . Kind , c ) buf . Write ( b ) buf . WriteByte ( ']' ) return buf . Bytes ( ) , nil }
MarshalJSON implements json.Marshaler.
MarshalJSON implements json . Marshaler .