mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Use better method of forcing serialisation
This commit is contained in:
parent
3c4ba6e9fc
commit
dcff8a193c
@ -3,7 +3,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
@ -45,10 +44,8 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public int MaxCombo { get; set; }
|
||||
|
||||
[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)]
|
||||
// ScoreRank is aligned to make 0 equal D. We still want to serialise this (even when DefaultValueHandling.Ignore is used).
|
||||
[JsonProperty("rank", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||
public ScoreRank Rank { get; set; }
|
||||
|
||||
[JsonProperty("started_at")]
|
||||
|
Loading…
Reference in New Issue
Block a user