22 lines
494 B
C#
22 lines
494 B
C#
using System.Text.Json;
|
|
using Contracts.Json;
|
|
|
|
namespace Contracts;
|
|
|
|
public static class ApiJsonOptions
|
|
{
|
|
public static JsonSerializerOptions Instance { get; } = Create();
|
|
|
|
private static JsonSerializerOptions Create()
|
|
{
|
|
var options = new JsonSerializerOptions
|
|
{
|
|
PropertyNamingPolicy = null,
|
|
PropertyNameCaseInsensitive = true,
|
|
};
|
|
|
|
options.Converters.Add(new DecimalFromStringJsonConverter());
|
|
return options;
|
|
}
|
|
}
|