【发布时间】:2011-03-24 11:29:04
【问题描述】:
在 VB.Net 类中,我有一个 JSON 数据作为字符串。我想将它们转换为 LINQ 类 Object。
`
'definition
Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
'return the data
Dim rawdata = js.DeserializeObject(strVal)
' i have this object , generated by LINQ
dim oCustomForm= new CustomForm
'what i need is to Deserialize the string INTO that object
'i tried this....but :(
'Dim oCustomForm As List(Of CustomForm) = CType(rawdata, List(Of CustomForm))
'Dim oCustomForm As new CustomForm = rawdata
`
谢谢....
【问题讨论】:
-
反序列化的结果表单是 System.Collections.Generic.List -> 我想将其转换为 oCustomForm ..这是一个对象形式CustomForms 类----
标签: sql-server vb.net linq visual-studio-2008 json