Namespace Codebelt.Extensions.Newtonsoft.Json
The Codebelt.Extensions.Newtonsoft.Json namespace helps you focus on your domain objects instead of writing boilerplate JSON serialization code. When you need dynamic converter creation, custom contract resolution per property, or rich JSON parsing that surfaces path and value details, this namespace provides the building blocks. Start with JData.ReadAll to parse JSON into navigable JDataResult sequences; use JsonConverterFactory.Create when you need a custom JsonConverter from a delegate; reach for DynamicContractResolver.Create when per-property contract customization is required.
Availability: .NET 10, .NET 9 and .NET Standard 2.0
Complements: Newtonsoft.Json namespace 🔗
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IEnumerable<JDataResult> | ⬇️ | Flatten, ExtractArrayValues, ExtractObjectValues |
| JsonSerializerSettings | ⬇️ | ApplyToDefaultSettings |
| JsonWriter | ⬇️ | WriteObject, WritePropertyName |
| Validator | ⬇️ | InvalidJsonDocument |
Classes
- DynamicContractResolver
Provides a factory based way to create and wrap an Newtonsoft.Json.Serialization.IContractResolver implementation.
- JData
Provides a factory based way to parse and extract values from various sources of JSON data. Compliant with RFC 7159 as it uses Newtonsoft.Json.JsonTextReader behind the scene.
- JDataResult
Specifies a result set of a JSON reader operation.
- JDataResultExtensions
Extension methods for the JDataResult class.
- JsonConverterFactory
Provides a factory based way to create and wrap an Newtonsoft.Json.JsonConverter implementation.
- JsonSerializerSettingsExtensions
Extension methods for the Newtonsoft.Json.JsonSerializerSettings class.
- JsonWriterExtensions
Extension methods for the Newtonsoft.Json.JsonWriter.
- ValidatorExtensions
Extension methods for the Validator class.