This project has moved and is read-only. For the latest updates, please go here.

null value exception thrown when deserializing null value

Jun 7, 2010 at 11:32 AM
Edited Jun 7, 2010 at 2:25 PM
Hi Friends I am trying to deserialize a hidden control field into a json object the code is as follows Dim settings As New Newtonsoft.Json.JsonSerializerSettings() settings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore Return Newtonsoft.Json.JsonConvert.DeserializeObject(Of testContract)(txtHidden.Text, settings) But I am getting the following exception. value cannot be null parameter name s: I even added the following lines but it still does not work out. Please help settings.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore settings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore settings.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace Thanks Bharath