This commit is contained in:
Stef Heyenrath
2026-04-26 08:52:56 +02:00
parent 31636e5e40
commit 47b0bf594f
2 changed files with 3 additions and 7 deletions
@@ -3,7 +3,6 @@
using System.Collections; using System.Collections;
using HandlebarsDotNet.Helpers.Models; using HandlebarsDotNet.Helpers.Models;
using JetBrains.Annotations; using JetBrains.Annotations;
using JsonConverter.Abstractions;
using JsonConverter.Newtonsoft.Json; using JsonConverter.Newtonsoft.Json;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
@@ -23,7 +22,7 @@ namespace WireMock.Transformers;
[PublicAPI] [PublicAPI]
public class NewtonsoftJsonBodyTransformer(WireMockServerSettings settings) : IJsonBodyTransformer public class NewtonsoftJsonBodyTransformer(WireMockServerSettings settings) : IJsonBodyTransformer
{ {
private readonly IJsonConverter _jsonConverter = new NewtonsoftJsonConverter(); private readonly NewtonsoftJsonConverter _jsonConverter = new();
/// <inheritdoc /> /// <inheritdoc />
public BodyData TransformBodyAsJson( public BodyData TransformBodyAsJson(
@@ -5,9 +5,7 @@ using System.Text.Json;
using System.Text.Json.Nodes; using System.Text.Json.Nodes;
using HandlebarsDotNet.Helpers.Models; using HandlebarsDotNet.Helpers.Models;
using JetBrains.Annotations; using JetBrains.Annotations;
using JsonConverter.Abstractions;
using JsonConverter.System.Text.Json; using JsonConverter.System.Text.Json;
using WireMock.Settings;
using WireMock.Types; using WireMock.Types;
using WireMock.Util; using WireMock.Util;
@@ -16,11 +14,10 @@ namespace WireMock.Transformers;
/// <summary> /// <summary>
/// JSON body transformer implementation based on System.Text.Json. /// JSON body transformer implementation based on System.Text.Json.
/// </summary> /// </summary>
/// <param name="settings">The server settings used to configure JSON transformation behavior.</param>
[PublicAPI] [PublicAPI]
public class SystemTextJsonBodyTransformer(WireMockServerSettings settings) : IJsonBodyTransformer public class SystemTextJsonBodyTransformer() : IJsonBodyTransformer
{ {
private readonly IJsonConverter _jsonConverter = new SystemTextJsonConverter(); private readonly SystemTextJsonConverter _jsonConverter = new();
/// <inheritdoc /> /// <inheritdoc />
public BodyData TransformBodyAsJson( public BodyData TransformBodyAsJson(