mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Replace usage of TypeNameHandling.All
with custom type converter
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
@ -161,9 +162,10 @@ namespace osu.Game.Online
|
||||
builder.AddNewtonsoftJsonProtocol(options =>
|
||||
{
|
||||
options.PayloadSerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
|
||||
// TODO: This should only be required to be `TypeNameHandling.Auto`.
|
||||
// See usage in osu-server-spectator for further documentation as to why this is required.
|
||||
options.PayloadSerializerSettings.TypeNameHandling = TypeNameHandling.All;
|
||||
options.PayloadSerializerSettings.Converters = new List<JsonConverter>
|
||||
{
|
||||
new SignalRDerivedTypeWorkaroundJsonConverter(),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user