code: func (jd *JSONDecoder) Encode(data []*FileDataEntry) ([]byte, error) {
  	// Convert to json-specific structure
  	var jsonFileEntries []jsonFileEntry
  	for _, dataEntry := range data {
  		jsonFileEntries = append(jsonFileEntries, jsonFileEntry{
  			Key:   dataEntry.Key,
  			Value: dataEntry.Value,
  		})
  	}
  	// Encode to type specific structure
  	jsonFile := &jsonFile{Data: jsonFileEntries}
  	return json.Marshal(jsonFile)
  }
docs: // Encode provided file entries into JSON byte set