mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
Fix SoloScoreInfo.Rank
not being serialised if rank is D
This commit is contained in:
parent
7916b99153
commit
3c4ba6e9fc
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
@ -45,6 +46,9 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
[JsonProperty("rank")]
|
||||
// ScoreRank is aligned to make 0 equal D. We still want to serialise this (even when DefaultValueHandling.Ignore is used),
|
||||
// so set the default to an impossible value.
|
||||
[DefaultValue(null)]
|
||||
public ScoreRank Rank { get; set; }
|
||||
|
||||
[JsonProperty("started_at")]
|
||||
|
Loading…
Reference in New Issue
Block a user