MappingSerializer (Newtonsoft or SystemText)-Json (#1394)

* MappingSerializer

* json

* .

* 0.8.0

* test

* mm
This commit is contained in:
Stef Heyenrath
2026-02-14 08:42:18 +01:00
committed by GitHub
parent f73bd5fc4f
commit df85649b67
18 changed files with 528 additions and 83 deletions

View File

@@ -14,6 +14,8 @@ using WireMock.RegularExpressions;
using WireMock.Types;
using System.Globalization;
using WireMock.Models;
using JsonConverter.Abstractions;
using JsonConverter.Newtonsoft.Json;
#if USE_ASPNETCORE
using Microsoft.Extensions.DependencyInjection;
@@ -349,4 +351,14 @@ public class WireMockServerSettings
/// </remarks>
[PublicAPI]
public ActivityTracingOptions? ActivityTracingOptions { get; set; }
/// <summary>
/// Gets or sets the default JSON converter used for serialization.
/// </summary>
/// <remarks>
/// Set this property to customize how objects are serialized to and deserialized from JSON during mapping.
/// Default is <see cref="NewtonsoftJsonConverter"/>.
/// </remarks>
[PublicAPI]
public IJsonConverter DefaultJsonSerializer { get; set; } = new NewtonsoftJsonConverter();
}