From 117d47bf7fab71653dc7cc35b469486a3a8df43a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 29 Sep 2021 11:26:37 +0900 Subject: [PATCH] Rename JSON key resolver to better expose what it's doing --- osu.Game/IO/Serialization/JsonSerializableExtensions.cs | 2 +- .../{KeyContractResolver.cs => SnakeCaseKeyContractResolver.cs} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename osu.Game/IO/Serialization/{KeyContractResolver.cs => SnakeCaseKeyContractResolver.cs} (84%) diff --git a/osu.Game/IO/Serialization/JsonSerializableExtensions.cs b/osu.Game/IO/Serialization/JsonSerializableExtensions.cs index 5b47d0bad1..68b2110ede 100644 --- a/osu.Game/IO/Serialization/JsonSerializableExtensions.cs +++ b/osu.Game/IO/Serialization/JsonSerializableExtensions.cs @@ -22,7 +22,7 @@ namespace osu.Game.IO.Serialization ObjectCreationHandling = ObjectCreationHandling.Replace, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate, Converters = new List { new Vector2Converter() }, - ContractResolver = new KeyContractResolver() + ContractResolver = new SnakeCaseKeyContractResolver() }; } } diff --git a/osu.Game/IO/Serialization/KeyContractResolver.cs b/osu.Game/IO/Serialization/SnakeCaseKeyContractResolver.cs similarity index 84% rename from osu.Game/IO/Serialization/KeyContractResolver.cs rename to osu.Game/IO/Serialization/SnakeCaseKeyContractResolver.cs index 7b6905643c..68cb66d0dc 100644 --- a/osu.Game/IO/Serialization/KeyContractResolver.cs +++ b/osu.Game/IO/Serialization/SnakeCaseKeyContractResolver.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json.Serialization; namespace osu.Game.IO.Serialization { - public class KeyContractResolver : DefaultContractResolver + public class SnakeCaseKeyContractResolver : DefaultContractResolver { protected override string ResolvePropertyName(string propertyName) {