public void SaveRecordedData(RecordedData aRecordedDataObject)
        {
            string json = JsonConvert.SerializeObject(aRecordedDataObject, Formatting.Indented);

            // write to the file
            using (StreamWriter sw = File.CreateText(recordedDataPath))
            {
                sw.WriteLine(json);
            }
        }
 public RecordedData LoadRecordedData()
 {
     // if the recorded data file does not exist, return an empty object
     if (!File.Exists(recordedDataPath))
     {
         RecordedData aRecordedDataObject = new RecordedData();
         return(aRecordedDataObject);
     }
     else
     {
         string       fileData            = File.ReadAllText(recordedDataPath);
         RecordedData aRecordedDataObject = JsonConvert.DeserializeObject <RecordedData>(fileData);
         return(aRecordedDataObject);
     }
 }