public void AddGroup(string groupName, string groupID) { string json = null; using (var streamReader = new StreamReader(fullPath)) { json = streamReader.ReadToEnd(); Console.WriteLine(json); } UserDB tempUser = JsonConvert.DeserializeObject <UserDB>(json); tempUser.AddGroup(groupName, groupID); string jsonConversiton = JsonConvert.SerializeObject(tempUser); File.WriteAllText(fullPath, jsonConversiton); }