diff --git a/eng/Dependencies.props b/eng/Dependencies.props index 02fa31c1ba..b4da0223e5 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -160,7 +160,6 @@ and are generated based on the last package release. - diff --git a/eng/Versions.props b/eng/Versions.props index fb43141088..1a458a547f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -195,7 +195,6 @@ 4.0.0 2.0.513 3.1.1 - 1.3.7 2.0.3 0.10.0 2.4.1 diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.cs b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.cs index f494902681..b1e5c8b475 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.cs +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.cs @@ -3,9 +3,9 @@ using System; using System.IO.Pipelines; +using System.Text.Json.Serialization; using System.Threading.Tasks; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; -using Utf8Json; namespace PlatformBenchmarks { @@ -25,6 +25,8 @@ namespace PlatformBenchmarks private readonly static AsciiString _plainTextBody = "Hello, World!"; + private static readonly JsonSerializerOptions SerializerOptions = new JsonSerializerOptions(); + public static class Paths { public readonly static AsciiString Plaintext = "/plaintext"; @@ -115,8 +117,8 @@ namespace PlatformBenchmarks // Content-Length header writer.Write(_headerContentLength); - var jsonPayload = JsonSerializer.SerializeUnsafe(new { message = "Hello, World!" }); - writer.WriteNumeric((uint)jsonPayload.Count); + var jsonPayload = JsonSerializer.ToBytes(new { message = "Hello, World!" }, SerializerOptions); + writer.WriteNumeric((uint)jsonPayload.Length); // End of headers writer.Write(_eoh); diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj b/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj index cd238b374f..4a9e6c3750 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj @@ -11,7 +11,6 @@ - @@ -20,7 +19,6 @@ -