diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Core/RawJsonString.cs b/src/Elastic.Clients.Elasticsearch.Shared/Core/RawJsonString.cs index 9c6fd54591e..bf910b35e80 100644 --- a/src/Elastic.Clients.Elasticsearch.Shared/Core/RawJsonString.cs +++ b/src/Elastic.Clients.Elasticsearch.Shared/Core/RawJsonString.cs @@ -13,6 +13,7 @@ namespace Elastic.Clients.Elasticsearch; #endif #if NET6_0_OR_GREATER +[JsonConverter(typeof(RawJsonConverter))] public struct RawJsonString { public RawJsonString(string rawJson) => Json = rawJson; diff --git a/tests/Tests/_VerifySnapshots/ScriptParamsSerializationTests.SerializesRawJson.verified.txt b/tests/Tests/_VerifySnapshots/ScriptParamsSerializationTests.SerializesRawJson.verified.txt index c83fabdedd8..8aa789bbadb 100644 --- a/tests/Tests/_VerifySnapshots/ScriptParamsSerializationTests.SerializesRawJson.verified.txt +++ b/tests/Tests/_VerifySnapshots/ScriptParamsSerializationTests.SerializesRawJson.verified.txt @@ -1,7 +1,7 @@ -{ +{ params: { person: { - json: { "forename": "raw_json" } + forename: raw_json } }, source: source