Skip to content

Commit 768b65b

Browse files
committed
Use source generation for the serializer
1 parent b9d8461 commit 768b65b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,6 @@
259259
<MicrosoftSymbolStoreVersion>1.0.406601</MicrosoftSymbolStoreVersion>
260260
<!-- installer version, for testing workloads -->
261261
<MicrosoftDotnetSdkInternalVersion>8.0.100-rtm.23506.1</MicrosoftDotnetSdkInternalVersion>
262-
<SdkVersionForWorkloadTesting>$(MicrosoftDotnetSdkInternalVersion)</SdkVersionForWorkloadTesting>
262+
<!-- <SdkVersionForWorkloadTesting>$(MicrosoftDotnetSdkInternalVersion)</SdkVersionForWorkloadTesting> -->
263263
</PropertyGroup>
264264
</Project>

src/mono/wasm/testassets/WasmBasicTestApp/LazyLoadingTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ public static void Run()
1212
{
1313
// System.Text.Json is marked as lazy loaded in the csproj ("BlazorWebAssemblyLazyLoad"), this method can be called only after the assembly is lazy loaded
1414
// In the test case it is done in the JS before call to this method
15-
var text = JsonSerializer.Serialize(new Person("John", "Doe"));
15+
var text = JsonSerializer.Serialize(new Person("John", "Doe"), SourceGenerationContext.Default.Person);
1616
TestOutput.WriteLine(text);
1717
}
1818

19+
internal partial class SourceGenerationContext : JsonSerializerContext
20+
{
21+
}
1922
public record Person(string FirstName, string LastName);
2023
}

0 commit comments

Comments
 (0)