mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-02-20 01:07:41 +01:00
* r * fix * sw * x * s * . * . * . * CreateTypeFromJObject * . * . * f * c * . * . * . * . * . * . * ok * , * . * . * . * . * n * pact * fix * schema * null * fluent * r * -p * . * . * refs * .
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace WireMock.Serialization;
|
|
|
|
internal static class JsonSerializationConstants
|
|
{
|
|
public static readonly JsonSerializerSettings JsonSerializerSettingsDefault = new()
|
|
{
|
|
Formatting = Formatting.Indented,
|
|
NullValueHandling = NullValueHandling.Ignore
|
|
};
|
|
|
|
public static readonly JsonSerializerSettings JsonSerializerSettingsIncludeNullValues = new()
|
|
{
|
|
Formatting = Formatting.Indented,
|
|
NullValueHandling = NullValueHandling.Include
|
|
};
|
|
|
|
public static readonly JsonSerializerSettings JsonDeserializerSettingsWithDateParsingNone = new()
|
|
{
|
|
DateParseHandling = DateParseHandling.None
|
|
};
|
|
|
|
public static readonly JsonSerializerSettings JsonSerializerSettingsPact = new()
|
|
{
|
|
Formatting = Formatting.Indented,
|
|
NullValueHandling = NullValueHandling.Ignore,
|
|
ContractResolver = new DefaultContractResolver
|
|
{
|
|
NamingStrategy = new CamelCaseNamingStrategy()
|
|
}
|
|
};
|
|
} |