JARRY转字符串之后,直接向ft赋值和用sql写入,得到的值不一样?
Dim arr As New JArray
Dim obj1 As New JObject
obj1("单号") = "A001"
arr.Add(obj1)
Dim obj2 As New JObject
obj2("单号") = "A002"
arr.Add(obj2)
Dim str As String = CompressJson(arr)
CurrentTable.Current("一级分类") = str
(得到的值为:[{"单号":"A001"},{"单号":"A002"}])
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "Insert Into test (一级分类) Values('" & str & "');Select SCOPE_IDENTITY()"
cmd.ExecuteNonQuery
DataTables ("test").Load()
(得到的值为:[["单号":"A001"],["单号":"A002"]])
两者不一样,一个为{},一个为[]