Class JsonConverterCollectionExtensions
- Assembly
- Cuemon.Extensions.AspNetCore.Text.Json.dll
Extension methods for the JsonConverter class.
public static class JsonConverterCollectionExtensions
- Inheritance
-
JsonConverterCollectionExtensions
Methods
AddHeaderDictionaryConverter(ICollection<JsonConverter>)
Adds an Microsoft.AspNetCore.Http.IHeaderDictionary JSON converter to the collection.
public static ICollection<JsonConverter> AddHeaderDictionaryConverter(this ICollection<JsonConverter> converters)
Parameters
converters
ICollection<JsonConverter>The collection of JsonConverter to extend.
Returns
- ICollection<JsonConverter>
A reference to
converters
so that additional calls can be chained.
AddHttpExceptionDescriptorConverter(ICollection<JsonConverter>, Action<ExceptionDescriptorOptions>)
Adds an HttpExceptionDescriptor JSON converter to the collection.
public static ICollection<JsonConverter> AddHttpExceptionDescriptorConverter(this ICollection<JsonConverter> converters, Action<ExceptionDescriptorOptions> setup = null)
Parameters
converters
ICollection<JsonConverter>The collection of JsonConverter to extend.
setup
Action<ExceptionDescriptorOptions>The ExceptionDescriptorOptions which may be configured.
Returns
- ICollection<JsonConverter>
A reference to
converters
so that additional calls can be chained.
AddProblemDetailsConverter(ICollection<JsonConverter>)
Adds a Microsoft.AspNetCore.Mvc.ProblemDetails JSON converter to the collection.
public static ICollection<JsonConverter> AddProblemDetailsConverter(this ICollection<JsonConverter> converters)
Parameters
converters
ICollection<JsonConverter>The collection of JsonConverter to extend.
Returns
- ICollection<JsonConverter>
A reference to
converters
so that additional calls can be chained.
AddStringValuesConverter(ICollection<JsonConverter>)
Adds an StringValues JSON converter to the collection.
public static ICollection<JsonConverter> AddStringValuesConverter(this ICollection<JsonConverter> converters)
Parameters
converters
ICollection<JsonConverter>The collection of JsonConverter to extend.
Returns
- ICollection<JsonConverter>
A reference to
converters
so that additional calls can be chained.