Символьная константа должна содержать ровно один символ.
Получение ошибки на подчеркнутых частях:
"Character constant must contain exactly one character."
Dim serializer = New System.Web.Script.Serialization.JavaScriptSerializer() Dim datae As List(Of datapart) = serializer.Deserialize(Of List(Of datapart))(datar) For Each element In datae oo += 1 dataa(oo, 1) = Convert.ToInt32(element.id) datestring(oo) = element.datetime dataa(oo, 2) = Convert.ToInt32(element.col1) dataa(oo, 3) = Convert.ToInt32(element.col2) dataa(oo, 4) = Convert.ToInt32(element.col3) Next Dim returndata As New List(Of datapart)() For i As Integer = 1 To oo If datestring(i) = date1 Then json1 = "[{" + "\"" + "id" + "\"" + ":" + dataa(i, 1) + "," + "\"" + "datetime" + "\"" + ":" + datestring(i) + "," + "\"" + "col1" + "\"" + ":" + dataa(i, 2) + "," + "\"" + "col2" + "\"" + ":" + dataa(i, 3) + "," + "\"" + "col3" + "\"" + ":" + dataa(i, 3) + "}]" End If Next Return serializer.Serialize(json1)
Что я уже пробовал:
Сделал все целые числа класса целыми числами, а строки класса строками.