Skip to content

Commit

Permalink
Use 'is not null' instead of '!= null' in Newtonsoft converter to avo…
Browse files Browse the repository at this point in the history
…id issues if wrapped type implements equality operators
  • Loading branch information
Patrik Eklöf committed Nov 22, 2023
1 parent ddd815a commit 375b0ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value,
public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
{
var result = serializer.Deserialize<VOUNDERLYINGTYPE>(reader);
return result != null ? VOTYPE.Deserialize(result) : null;
return result is not null ? VOTYPE.Deserialize(result) : null;
}
}

0 comments on commit 375b0ac

Please sign in to comment.