Table of Contents

Namespace Codebelt.Extensions.Newtonsoft.Json.Converters

The Codebelt.Extensions.Newtonsoft.Json.Converters namespace provides Newtonsoft.Json converters for enums, exceptions, failures, and data pairs, plus extension methods that register them into a JsonConverter collection. Use AddStringEnumConverter to serialize enums as their string names, AddExceptionConverter to write exceptions with configurable stack-trace and data inclusion, and the remaining converters for specialized TransientFaultException, DataPair, and Failure serialization.

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

Complements: Newtonsoft.Json.Converters namespace 🔗

Extension Members

Type Ext Methods
ICollection ⬇️ AddStringEnumConverter, AddStringFlagsEnumConverter, AddExceptionDescriptorConverterOf<T>, AddExceptionConverter, AddDataPairConverter, AddTransientFaultExceptionConverter, AddFailureConverter

Classes

ExceptionConverter

Converts an Exception to or from JSON.

JsonConverterCollectionExtensions

Extension methods for the Newtonsoft.Json.JsonConverter class.

StringFlagsEnumConverter

Converts a FlagsEnum to its name string value.

TransientFaultExceptionConverter

Converts a TransientFaultException to or from JSON.