Table of Contents

Namespace Codebelt.Extensions.Newtonsoft.Json.Serialization

The Codebelt.Extensions.Newtonsoft.Json.Serialization namespace resolves the configured NamingStrategy from any IContractResolver, saving you from type-checking the resolver at runtime. Call ResolveNamingStrategyOrDefault on an IContractResolver to extract its NamingStrategy (for example, CamelCaseNamingStrategy from CamelCasePropertyNamesContractResolver) or fall back to a default when none is set. This is the sole entry point in this namespace.

Availability: .NET 10, .NET 9 and .NET Standard 2.0

Complements: Newtonsoft.Json.Serialization namespace 🔗

Extension Members

Type Ext Methods
IContractResolver ⬇️ ResolveNamingStrategyOrDefault

Classes

ContractResolverExtensions

Extension methods for the Newtonsoft.Json.Serialization.IContractResolver interface.