public void WriteToJsonFile(string path, MedicineRepository medicineRepository)
        {
            var jsonData = JsonSerializer.Serialize <MedicineRepository>(medicineRepository);

            File.WriteAllText(path, jsonData);
        }
 public Repository(IJsonReader jsonReader, IJsonWriter jsonWriter)
 {
     myJsonReader         = jsonReader;
     myJsonWriter         = jsonWriter;
     myMedicineRepository = myJsonReader.ReadJsonFile(path);
 }