OutWit.Common.Settings.Json 2.0.2

dotnet add package OutWit.Common.Settings.Json --version 2.0.2
                    
NuGet\Install-Package OutWit.Common.Settings.Json -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OutWit.Common.Settings.Json" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Common.Settings.Json" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Common.Settings.Json" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OutWit.Common.Settings.Json --version 2.0.2
                    
#r "nuget: OutWit.Common.Settings.Json, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OutWit.Common.Settings.Json@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OutWit.Common.Settings.Json&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Common.Settings.Json&version=2.0.2
                    
Install as a Cake Tool

OutWit.Common.Settings.Json

Overview

OutWit.Common.Settings.Json is a JSON file storage provider for the OutWit.Common.Settings framework. It enables storing and loading application settings in human-readable JSON format with support for group metadata, multi-scope storage, and automatic schema merging.

Features

1. Simple Integration

Use the UseJson() extension method to configure JSON storage with conventional defaults:

var manager = new SettingsBuilder()
    .UseJson()  // Uses {AppContext.BaseDirectory}/Resources/settings.json
    .RegisterContainer<ApplicationSettings>()
    .Build();

manager.Merge();
manager.Load();

2. Custom File Paths

Specify custom paths for defaults and scope-specific files:

var manager = new SettingsBuilder()
    .UseJson("path/to/defaults.json")
    .Build();

Or add individual JSON files for specific scopes:

builder.UseJsonFile("config/global-settings.json", SettingsScope.Global);
builder.UseJsonFile("config/user-settings.json", SettingsScope.User);

3. JSON File Format

Settings are stored as arrays keyed by group name with optional group metadata:

{
  "__groups__": {
    "AppSettings": {
      "displayName": "Application",
      "priority": 0
    },
    "Notifications": {
      "displayName": "Notifications",
      "priority": 5
    }
  },
  "AppSettings": [
    {
      "key": "Theme",
      "value": "Light",
      "valueKind": "Enum",
      "tag": "MyApp.AppTheme, MyApp"
    },
    {
      "key": "Language",
      "value": "en-US",
      "valueKind": "Language"
    },
    {
      "key": "AutoSave",
      "value": "True",
      "valueKind": "Boolean"
    }
  ]
}

4. Multi-Scope Support

Automatically creates separate JSON files for User and Global scopes based on assembly path conventions:

  • Default: Resources/settings.json (read-only)
  • User: {UserProfile}/.config/{AppName}/settings.json
  • Global: {CommonAppData}/{AppName}/settings.json

5. Readable and Editable

JSON format allows easy manual editing and version control of configuration files.

Installation

Install the package via NuGet:

Install-Package OutWit.Common.Settings.Json

Dependencies:

  • OutWit.Common.Settings

License

Licensed under the Apache License, Version 2.0. See LICENSE.

Attribution (optional)

If you use OutWit.Common.Settings.Json in a product, a mention is appreciated (but not required), for example: "Powered by OutWit.Common.Settings.Json (https://ratner.io/)".

Trademark / Project name

"OutWit" and the OutWit logo are used to identify the official project by Dmitry Ratner.

You may:

  • refer to the project name in a factual way (e.g., "built with OutWit.Common.Settings.Json");
  • use the name to indicate compatibility (e.g., "OutWit.Common.Settings.Json-compatible").

You may not:

  • use "OutWit.Common.Settings.Json" as the name of a fork or a derived product in a way that implies it is the official project;
  • use the OutWit.Common.Settings.Json logo to promote forks or derived products without permission.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 83 2/14/2026
2.0.0 81 2/11/2026