Skip to content

Commit 3cbee8a

Browse files
committed
Allows nullable fields to be ignored during JSON deserialization
1 parent f641367 commit 3cbee8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DiscordRPC/User.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public enum AvatarSize
9191
/// <summary>
9292
/// The flags on a users account, often represented as a badge.
9393
/// </summary>
94-
[JsonProperty("flags")]
94+
[JsonProperty("flags", NullValueHandling = NullValueHandling.Ignore)]
9595
public Flag Flags { get; private set; }
9696

9797
/// <summary>
@@ -140,7 +140,7 @@ public enum Flag
140140
/// <summary>
141141
/// The premium type of the user.
142142
/// </summary>
143-
[JsonProperty("premium_type")]
143+
[JsonProperty("premium_type", NullValueHandling = NullValueHandling.Ignore)]
144144
public PremiumType Premium { get; private set; }
145145

146146
/// <summary>

0 commit comments

Comments
 (0)