nucs.JsonSettings 2.0.0-alpha5

.NET Standard 2.0
This is a prerelease version of nucs.JsonSettings.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nucs.JsonSettings --version 2.0.0-alpha5
NuGet\Install-Package nucs.JsonSettings -Version 2.0.0-alpha5
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="nucs.JsonSettings" Version="2.0.0-alpha5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nucs.JsonSettings --version 2.0.0-alpha5
#r "nuget: nucs.JsonSettings, 2.0.0-alpha5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install nucs.JsonSettings as a Cake Addin
#addin nuget:?package=nucs.JsonSettings&version=2.0.0-alpha5&prerelease

// Install nucs.JsonSettings as a Cake Tool
#tool nuget:?package=nucs.JsonSettings&version=2.0.0-alpha5&prerelease

<img src="" width="25" style="margin: 5px 0px 0px 10px"/> JsonSettings

Nuget downloads NuGet GitHub license

This library aims to simplify the process of creating configuration for your C# app/service by utilizing the serialization capabilities of Json.NET to serialize nested (custom) objects, dictionaries and lists as simply as by creating a POCO and inheriting JsonSettings class.<br/>


PM> Install-Package nucs.JsonSettings

Table of Contents

Features Overview

  • Initialized in a fluent static API <span style='font-size:11px; padding-left: 3px' >read more</span>
  • Cross-platform targeting netstandard2.0
  • Modularity allowing easy extension and high control over behavior on a per-object level <span style='font-size:11px; padding-left: 3px' >read more</span>
  • Autosaving on changes <span style='font-size:11px; padding-left: 3px' >read more</span>
    • Via INotificationChanged/INotificationCollectionChanged allowing WPF binding (with interval throttling support to avoid cpu overload) <span style='font-size:11px; padding-left: 3px' >read more</span>
    • Via Castle.DynamicProxy generated wrapper <span style='font-size:11px; padding-left: 3px' >read more</span>
  • Versioning control <span style='font-size:11px; padding-left: 3px' >read more</span>
    • Offers protection mechanisms such as renaming file and loading default
    • By changing version, it allows to introduce any kind of changes to the settings class
  • Customizable control over recovering from parsing exceptions <span style='font-size:11px; padding-left: 3px' >read more</span>
  • AES256 Encryption via a key <span style='font-size:11px; padding-left: 3px' >read more</span>
  • Fully extensible with Json.NET 's capabilities, attributes and settings
    • It'll be accurate to say that this library is build around Json.NET
  • SettingsBag, a dynamic option that uses a Dictionary<string,object> eliminating the need for hardcoding writing a POCO <span style='font-size:11px; padding-left: 3px' >read more</span>
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on nucs.JsonSettings:

Package Downloads

Windows 11 settings page in WinUI 3 apps With many useful helper classes


An extension to JsonSettings that allows to wrap a class via transparent proxy that autosaves. Support for Autosaving on INotifyPropertyChanged/INotifyCollectionChanged.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on nucs.JsonSettings:

Repository Stars
GUI for installing apps through WinGet and Creating Yaml file
Windows 11 settings page in WinUI 3 applications ported from Powertoys
Version Downloads Last updated
2.0.0-alpha7 2,022 5/23/2021
2.0.0-alpha5 236 5/9/2021
2.0.0-alpha4 212 5/8/2021
2.0.0-alpha3 257 5/1/2021
2.0.0-alpha2 283 3/31/2021
2.0.0-alpha1 226 3/29/2021
1.0.7 7,645 6/3/2018
1.0.6 900 5/26/2018
1.0.5 950 5/11/2018
1.0.4 934 4/12/2018
1.0.3 916 4/12/2018
1.0.2 941 4/8/2018 1,089 9/30/2017

- Added RecoveryModule  and .WithRecovery to capture parsing errors
- Added JsonSettings.SuspendAutosave() extension
- Added proxy construction guard to prevent unncessary allocation on proxy creation.
- Fix non virtual built-in properties returning null after being wrapped with proxy.
- Added ProxyGeneratedAttribute that is attached to every proxy-generated class
- Module: made Dispose() inheritable.
- Module.Socket: changed to WeakReference<JsonSettings>
- SettingsBag: added support for SuspendAutosave #26
- VersioningModule: some internal fixes and renames #19
- Added RecoveryModule and WithRecovery api. #19
- JsonSettings: added TryingRecover and Recovered events.
- JsonSettings: Removed ThrowOnEmptyFile, this is handled by RecoveryModule now
- Made all module functions and variables protected or virtual.
- FluentJsonSettings: replaced dynamic creation with hardcoded creation (faster).
- Added proper Versioning example
- JsonSettings: add OnXXXX methods that trigger event changed to protected internal.
- Made all modules extensible
- SettingsBag: removed locking, optimized and replaced with ConcurrentDictionary for threadsafety
- Added documentation