public static void JSON_Serialized(ListUsers UserCollection) { //serialize object into the JSON file, you may need to re write the entire thing or just add to it not sure string JsonUser = JsonConvert.SerializeObject(UserCollection); System.IO.File.WriteAllText("JSONdata/collection.json", JsonUser);//might wanna to a check on this not sure }
public static void JSON_Deserialized() { string JSONstring = System.IO.File.ReadAllText("JSONdata/collection.json"); UserCollection = JsonConvert.DeserializeObject <ListUsers>(JSONstring); }