I just created an REST-ful webservice with a WebserviceHost. I have several methods that wil return a JSON-object to the user, if he makes a GET request.
[OperationContract]
[WebGet(ResponseFormat = WebMessageFormat.Json,
UriTemplate = "appliances/{username}")]
List<object[]> GetAvailableAppliances(string username);
This method returns values from a database. In the object-array are a few dbnull values but the standard JSON Serializer can't handle it. If the user does a request, the connection is resetted, but only if there are dbnull values in the list.
How can I handle these dbnull values? Do I have to change the values before the list will be serialized or is there a different solution?