I have an ASP.NET MVC application that returns a Customer object that is converted to JSON using the Json() method.
return Json(Repository.Customer.Get(id));
One of the properties of the Customer object is Customer.Gender. If the Gender property contains a Null value, the JSON object received on the client contains
Gender: "<null>"
Is there a way to have the properties with Null values contain empty strings in the JSON object rather than the "null" text?