1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Merge pull request #14888 from peppy/rename-json-key-resolver

Rename JSON key resolver to better expose what it's doing
This commit is contained in:
Dan Balasescu 2021-09-29 16:58:42 +09:00 committed by GitHub
commit ce3cf72a77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ namespace osu.Game.IO.Serialization
ObjectCreationHandling = ObjectCreationHandling.Replace,
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
Converters = new List<JsonConverter> { new Vector2Converter() },
ContractResolver = new KeyContractResolver()
ContractResolver = new SnakeCaseKeyContractResolver()
};
}
}

View File

@ -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)
{