Skip to content

Commit

Permalink
etc
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus committed Sep 4, 2023
1 parent eae8a14 commit edb31bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Samples/Trimming/cs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[assembly: JSExport(typeof(IBackend))]

Serializer.Options = new(JsonSerializerDefaults.Web) {
TypeInfoResolver = SourceGenerationContext.Default
TypeInfoResolver = SerializerContext.Default
};

_ = new Backend.JSBackend(new SharpBackend());
Expand Down Expand Up @@ -37,4 +37,4 @@ internal class SharpBackend : IBackend
// (which strips reflection-based JSON serialization), we have to manually hint the serialized types.
// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation
[JsonSerializable(typeof(Info))]
internal partial class SourceGenerationContext : JsonSerializerContext;
internal partial class SerializerContext : JsonSerializerContext;

0 comments on commit edb31bf

Please sign in to comment.