func (d *Deck) MarshalJSON() ([]byte, error) {
	if err := d.Validate(); err != nil {
		return nil, err
	}
	doc := struct {
		deckAlias
		Type     string     `json:"type"`
		Imported *time.Time `json:"imported,omitempty"`
	}{
		Type:      "deck",
		deckAlias: deckAlias(*d),
	}
	if !d.Imported.IsZero() {
		doc.Imported = &d.Imported
	}
	return json.Marshal(doc)
}
// MarshalJSON implements the json.Marshaler interface for the Deck type.
MarshalJSON implements the json.Marshaler interface for the Deck type.
// MarshalJSON implements the json . Marshaler interface for the Deck type .
func (d *Deck) MarshalJSON() ([]byte, error) {
	if err := d.Validate(); err != nil {
		return nil, err
	}
	doc := struct {
		deckAlias
		Type     string     `json:"type"`
		Imported *time.Time `json:"imported,omitempty"`
	}{
		Type:      "deck",
		deckAlias: deckAlias(*d),
	}
	if !d.Imported.IsZero() {
		doc.Imported = &d.Imported
	}
	return json.Marshal(doc)
}
func ( d * Deck ) MarshalJSON ( ) ( [ ] byte , error ) { if err := d . Validate ( ) ; err != nil { return nil , err } doc := struct { deckAlias Type string `json:"type"` Imported * time . Time `json:"imported,omitempty"` } { Type : " " , deckAlias : deckAlias ( * d ) , } if ! d . Imported . IsZero ( ) { doc . Imported = & d . Imported } return json . Marshal ( doc ) }
MarshalJSON implements the json.Marshaler interface for the Deck type.
MarshalJSON implements the json . Marshaler interface for the Deck type .