mirror of
https://github.com/osukey/osukey.git
synced 2025-06-29 07:07:55 +09: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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
@ -45,6 +46,9 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
|
|
||||||
[JsonConverter(typeof(StringEnumConverter))]
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
[JsonProperty("rank")]
|
[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; }
|
public ScoreRank Rank { get; set; }
|
||||||
|
|
||||||
[JsonProperty("started_at")]
|
[JsonProperty("started_at")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user