how to set an attribute to ignore null value json c#


[JsonProperty(NullValueHandling=NullValueHandling.Ignore)]
// or
[JsonProperty("property_name", NullValueHandling=NullValueHandling.Ignore)]
‚Äč
// or for all properties in a class
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]

www.codegrepper.com
www.stackoverflow.com