Update JSON File with new values without overwriting existing data
Hello,
So I'm currently developing a Discord bot that stores values such as 'settings' for each guild. I already got that part figured out very well but I would like to know how I should handle additions / removes.
I have a class as followed:
As an example, currently, the json file doesn't have the
So I'm currently developing a Discord bot that stores values such as 'settings' for each guild. I already got that part figured out very well but I would like to know how I should handle additions / removes.
I have a class as followed:
As an example, currently, the json file doesn't have the
public bool EnableModeratorNotifications included but it is a new feature I would like to add. If I add that to my class, how would I serialize it into the json file with a default value like true/false without overwriting the existing values there?


