mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-06-29 05:16:32 +02:00
.
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user