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