mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-30 18:40:50 +02:00
36b0a93a6c
* SystemTextJsonMatcher * , * . * new projectx * Update test/WireMock.Net.Tests/Pact/PactTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/WireMock.Net.Tests/WebSockets/WebSocketIntegrationTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/WireMock.Net/WireMock.Net.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/WireMock.Net.Minimal/Properties/AssemblyInfo.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * . * more tests * . * . * x * ... * . * fix tests * 0.11.0 * . * delete jsonutils.cs * s * fix findings * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Potential fix for pull request finding 'Missing Dispose call on local IDisposable' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * JsonConverter 0.12.0 * -- tools --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
// Copyright © WireMock.Net
|
|
|
|
using JsonConverter.Abstractions;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace WireMock.Serialization;
|
|
|
|
internal static class JsonSerializationConstants
|
|
{
|
|
internal static readonly JsonConverterOptions JsonConverterOptionsDefault = new()
|
|
{
|
|
WriteIndented = true,
|
|
IgnoreNullValues = true
|
|
};
|
|
|
|
internal static readonly JsonConverterOptions JsonConverterOptionsIncludeNullValues = new()
|
|
{
|
|
WriteIndented = true,
|
|
IgnoreNullValues = false
|
|
};
|
|
|
|
internal static readonly JsonConverterOptions JsonConverterOptionsWithDateParsingNone = new()
|
|
{
|
|
WriteIndented = true,
|
|
DateParseHandling = 0
|
|
};
|
|
|
|
internal static readonly JsonSerializerSettings JsonDeserializerSettingsWithDateParsingNone = new()
|
|
{
|
|
DateParseHandling = DateParseHandling.None
|
|
};
|
|
|
|
internal static readonly JsonSerializerSettings JsonSerializerSettingsPact = new()
|
|
{
|
|
Formatting = Formatting.Indented,
|
|
NullValueHandling = NullValueHandling.Ignore,
|
|
ContractResolver = new DefaultContractResolver
|
|
{
|
|
NamingStrategy = new CamelCaseNamingStrategy()
|
|
}
|
|
};
|
|
} |