ObjectConfigurationExtensions 4.0 is a major refresh of the library, simplifying the API and aligning object-backed configuration with the behavior of the built-in .NET configuration providers.
Highlights
AddObjectis now generic, with a smaller API surface centered on System.Text.Json.- Added
AddObjectAsFallback, making it easy to provide code-defined defaults that remain overrideable byappsettings.json, environment variables, command-line arguments, and other configuration providers. - Added
JsonTypeInfo<T>overloads for bothAddObjectandAddObjectAsFallback, enabling source-generated System.Text.Json metadata for trimming and Native AOT scenarios. - Object configuration now follows .NET 10 JSON configuration semantics for null values, empty strings, empty objects, empty arrays, and null array elements.
- The implementation now builds on the standard JSON stream configuration provider instead of maintaining a separate JSON-to-configuration implementation.
- The Newtonsoft.Json companion package and the custom serializer abstraction have been removed.
The package now targets netstandard2.0 and net10.0.
Full changelog: v3.0.1...v4.0.0