嗨朋友我正在尝试将隐藏的控制字段反序列化为 JSON 对象,代码如下:
Dim settings As New Newtonsoft.Json.JsonSerializerSettings()
settings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore
Return Newtonsoft.Json.JsonConvert.DeserializeObject(Of testContract)(txtHidden.Text, settings)
但我收到以下异常。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