SkillAgentSearch skills...

WritableJsonConfiguration

Source of configurations in JSON format with the ability to edit values directly from the running application. Based on Microsoft.Extensions.Configuration.

Install / Use

/learn @Kibnet/WritableJsonConfiguration
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

WritableJsonConfiguration

<img src="https://github.com/Kibnet/WritableJsonConfiguration/raw/master/resources/JSON_logo.png" alt="JSON" width="180"/>

GitHub last commit GitHub code size in bytes

GitHub search hit counter Nuget

What is it?

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.

How to use?

Add Nuget Package in your project:

Install-Package WritableJsonConfiguration

Create configuration:

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));

Get value:

Themes theme = configuration.GetSection("Appearance:Theme").Get<Themes>();

or

Themes theme = configuration.Get<Themes>("Appearance:Theme");

Set value:

configuration.GetSection("Appearance:Theme").Set(theme);

or

configuration.Set("Appearance:Theme", theme);

Communication

Any suggestions and comments are welcome. If you want to contact me, use Telegram

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated11d ago
Forks3

Languages

C#

Security Score

90/100

Audited on Mar 20, 2026

No findings