code: func (s *Record) MarshalJSON() ([]byte, error) {
  	m := make(map[string]interface{})
  
  	m["type"] = "record"
  
  	if len(s.Name) > 0 {
  		m["name"] = s.Name
  	}
  
  	if len(s.Namespace) > 0 {
  		m["namespace"] = s.Namespace
  	}
  
  	if len(s.Doc) > 0 {
  		m["doc"] = s.Doc
  	}
  	if len(s.Aliases) > 0 {
  		m["aliases"] = s.Aliases
  	}
  
  	m["fields"] = s.Fields
  	for k, v := range s.Properties {
  		m[k] = v
  	}
  	return json.Marshal(m)
  }
docs: // MarshalJSON serializes the given schema as JSON.