Settings for .NET, in one line
Nucs.JsonSettings
The easiest way you'll ever write settings for your app. Cross-platform, modular, and still a one-liner — built on Json.NET, so nested objects, dictionaries and lists just serialize, with no mapping to write.
Install and run
Inherit one class, load with one call, change a property, save.
dotnet add package Nucs.JsonSettings
dotnet add package Nucs.JsonSettings.Autosave
using Nucs.JsonSettings;
class MySettings : JsonSettings {
public override string FileName { get; set; } = "config.json";
public string Name { get; set; } = "default";
}
var settings = JsonSettings.Load<MySettings>("config.json");
settings.Name = "ok";
settings.Save();
Documentation Map
Pick what you're reaching for.
Hardcoded POCO settings, dynamic bags, encryption and autosave — the four ways to load.
Dynamic SettingsBagA key/value bag when you don't want to hardcode a settings class.
Security EncryptionAES-256 over the serialized JSON, keyed by a password or a password fetcher.
Persistence AutosaveSave automatically on change, with WPF INotifyPropertyChanged support and suspension.
Decide what happens when a file fails to parse or its schema version moves on.
Extend Modulation APIThe load/save event pipeline every feature is built on — write your own module.
What JsonSettings Optimizes For
One-liner ergonomics, with full control when you need it.
It is built around Json.NET, so nested custom objects, dictionaries and lists serialize out of the box, with every Json.NET attribute and setting available to you.
Encryption, Base64, versioning, recovery and autosave are all modules on a per-object socket. Attach only what an object needs.
The same package runs on .NET Framework, modern .NET, Unity and Xamarin through its netstandard2.0 asset.
Inherit JsonSettings for a typed POCO, or use SettingsBag for a dynamic key/value store — both save the same way.