How to pass empty or null date in JSON for WCF REST Web service
json, rest, wcf
Solution
Why don't you just set OccasionDate to null?
Problem
We have JSON object as follows. ``` { "AdvanceNotificationDays":null, "Egos":[], "Interests":[], "Name":"Birthday gift for Ruchir", "Occasion":null, "OccasionDate":"\/Date(null)\/", "ProfileId":null, "UserId":4350, "WishlistId":0, "isShared":false } ``` We try to pass this JSON object to the server and everything gets parsed except the Date. For date, the JSON parser throws the exception that says "Cannot parse null to Int64". We just want to pass empty date or null date to the server. Can anybody please help? We googled for solution to this issue, did not find an answer so far.