code: func (s *RecordSchema) MarshalJSON() ([]byte, error) {
  	return json.Marshal(struct {
  		Type      string         `json:"type,omitempty"`
  		Namespace string         `json:"namespace,omitempty"`
  		Name      string         `json:"name,omitempty"`
  		Doc       string         `json:"doc,omitempty"`
  		Aliases   []string       `json:"aliases,omitempty"`
  		Fields    []*SchemaField `json:"fields"`
  	}{
  		Type:      "record",
  		Namespace: s.Namespace,
  		Name:      s.Name,
  		Doc:       s.Doc,
  		Aliases:   s.Aliases,
  		Fields:    s.Fields,
  	})
  }
docs: // MarshalJSON serializes the given schema as JSON.