I am using the following code:
myObj jsonStream = ser.Deserialize<myObj>(jsonStream);
And everything worked fine until the JSON that came back had a null value for one of the fields. i.e:.
"name" : null
During the deserialization process, he throws an exception. In my myObj, I have a member:
public string name;
How can I gracefully handle the odd null returned from my data source using the System.Web.Script.Serialization assembly? I tried:
public string name = "";
But that did not work.
source
share