null value exception thrown when deserializing null value JSON.net

Posted by Bharath on Stack Overflow See other posts from Stack Overflow or by Bharath
Published on 2010-06-07T10:35:55Z Indexed on 2010/06/07 10:42 UTC
Read the original article Hit count: 543

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about .NET

Related posts about JSON