//Get all candidates list public IList <InterviewCandidate> GetAllCandidates() { InterviewCandidates candidates = GetCandidateObjects(); IList <InterviewCandidate> candidate = candidates.CandidateList; return(candidate); }
private InterviewCandidates GetCandidateObjects() { string jsonString = GetJsonStringFromFile(); InterviewCandidates candidates = Newtonsoft.Json.JsonConvert.DeserializeObject <InterviewCandidates>(jsonString); return(candidates); }
public void SaveChanges(IList <InterviewCandidate> candidatesList) { string jsonString = string.Empty; InterviewCandidates candidates = new InterviewCandidates(); candidates.CandidateList = candidatesList; jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(candidates); File.WriteAllText(fileName, jsonString); }