Skip to content

Commit 26f3b68

Browse files
committed
Use JsonSourceGenerationMode.Default
1 parent 2d5bdda commit 26f3b68

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/BenchmarksApps/TechEmpower/Kestrel/BenchmarkApp.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Buffers;
2-
using System.Formats.Asn1;
32
using System.Text;
43
using System.Text.Json;
54
using System.Text.Json.Serialization;
@@ -162,11 +161,11 @@ private class Utf8JsonWriterPooledObjectPolicy : IPooledObjectPolicy<Utf8JsonWri
162161

163162
private static readonly JsonContext SerializerContext = JsonContext.Default;
164163

165-
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Serialization)]
164+
// BUG: Can't use GenerationMode = JsonSourceGenerationMode.Serialization here due to https://github.com/dotnet/runtime/issues/111477
165+
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Default)]
166166
[JsonSerializable(typeof(JsonMessage))]
167167
private partial class JsonContext : JsonSerializerContext
168168
{
169169

170170
}
171-
172171
}

src/BenchmarksApps/TechEmpower/Kestrel/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"http": {
55
"commandName": "Project",
66
"dotnetRunMessages": true,
7-
"launchBrowser": false,
7+
"launchBrowser": true,
88
"applicationUrl": "http://localhost:5123",
99
"environmentVariables": {
1010
"ASPNETCORE_ENVIRONMENT": "Development"

0 commit comments

Comments
 (0)