If you want to add a settings to your app and you like json, then this is what you need. This uses the standard interface for working with settings, which is provided by Microsoft.Extensions.Configuration. To do this, we added methods for changing values in settings via the standard interface, which will edit the json file themselves.
Add Nuget Package in your project:
Install-Package WritableJsonConfiguration
IConfigurationRoot configuration = WritableJsonConfigurationFabric.Create("Settings.json");
Use this configuration in the app as you need, usually people register it with the IoC, example(Splat):
Locator.CurrentMutable.RegisterConstant(configuration, typeof(IConfiguration));
Themes theme = configuration.GetSection("Appearance:Theme").Get<Themes>();
or
Themes theme = configuration.Get<Themes>("Appearance:Theme");
configuration.GetSection("Appearance:Theme").Set(theme);
or
configuration.Set("Appearance:Theme", theme);
Any suggestions and comments are welcome. If you want to contact me, use Telegram