An empty string is usually parsed to null in JSON but I have a request which contains:
"StreetValue":"",
In my class it is de-serialized as a decimal
public decimal StreetValue { get; set; }
But when I pass the empty string it is getting de-serialized as 0.00M instead of null. What am I missing?
My intent is for it to be de-serialized as 0 only if "0.00M" is passed else it should be null.
decimalis not nullable, you cannot assignnulltodecimal.