嗨朋友我试图将隐藏的控制字段反序列化为JSON对象,代码如下:
Dim settings As New Newtonsoft.Json.JsonSerializerSettings()
settings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
Return Newtonsoft.Json.JsonConvert.DeserializeObject(Of testContract)(txtHidden.Text, settings)
Run Code Online (Sandbox Code Playgroud)
但我得到以下例外.value cannot be null parameter name s:我甚至添加了以下行,但它仍然无法解决.请帮忙.
settings.MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
settings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
settings.ObjectCreationHandling = Newtonsoft.Json.ObjectCreationHandling.Replace
Run Code Online (Sandbox Code Playgroud)