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