diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Data/SerializationTestBase.cs b/src/Nethermind/Nethermind.JsonRpc.Test/Data/SerializationTestBase.cs index 9481c0e77d7..af8d325612c 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/Data/SerializationTestBase.cs +++ b/src/Nethermind/Nethermind.JsonRpc.Test/Data/SerializationTestBase.cs @@ -69,7 +69,7 @@ protected void TestToJson(T item, string expectedResult, params JsonConverter IJsonSerializer serializer = BuildSerializer(converters); string result = serializer.Serialize(item); - Assert.That(result, Is.EqualTo(expectedResult.Replace("+", "\\u002B")), result.Replace("\"", "\\\"")); + Assert.That(result, Is.EqualTo(expectedResult), result.Replace("\"", "\\\"")); } private static IJsonSerializer BuildSerializer(params JsonConverter[] converters) => new EthereumJsonSerializer(converters); diff --git a/src/Nethermind/Nethermind.Serialization.Json/EthereumJsonSerializer.cs b/src/Nethermind/Nethermind.Serialization.Json/EthereumJsonSerializer.cs index a99afd49a63..01e23bfccf6 100644 --- a/src/Nethermind/Nethermind.Serialization.Json/EthereumJsonSerializer.cs +++ b/src/Nethermind/Nethermind.Serialization.Json/EthereumJsonSerializer.cs @@ -6,8 +6,10 @@ using System.Collections.Generic; using System.IO; using System.IO.Pipelines; +using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; +using System.Text.Unicode; using System.Threading.Tasks; using Nethermind.Core.Collections; @@ -63,6 +65,7 @@ private static JsonSerializerOptions CreateOptions(bool indented, IEnumerable