mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 02:38:54 +02:00
MappingSerializer (Newtonsoft or SystemText)-Json (#1394)
* MappingSerializer * json * . * 0.8.0 * test * mm
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user