看了半天 实在是鼓捣不出来
'Dim jo As New JObject '用于生成和解析JSON数据
' Dim jo1 As New JObject '用于生成和解析JSON数据
'
'jo("data") = jo1
' Dim ja As New JArray '定义数组
' jo1("responseData") = ja
' Dim jo2 As New JObject
' ja("data") = jo2
'
' Dim ja1 As New JArray '定义数组
'
For Each dr As DataRow in dt.DataRows
''
ja1("level") = dr("level").ToString '转json对象,要tostring
'
ja1("appType") = dr("appType").ToString '转json对象,要tostring
'
ja1("desc") = dr("desc").ToString '转json对象,要tostring
'
jo2.Add(ja1)
'
Next
'
Dim ja2 As New JArray
'
jo1("columnData") = ja2
'
Dim ja21 As New JArray
'
ja21(0)("key") = "level"
'
ja21(0)("text") = "风险级别"
'
ja21(1)("key") = "appType"
'
ja21(1)("text") = "业务类型"
'
ja21(2)("key") = "desc"
'
ja21(2)("text") = "风险描述"
'
' e.WriteString(jo.ToString)
[此贴子已经被作者于2021/6/24 21:47:48编辑过]