Error converting value to type 'System.Int64' while desalinizing JSON object to data table

I am trying to deserialize JSON output to the data table and getting the below error

Error converting value “1D” to type ‘System.Int64’

I am using this - > JsonConvert.DeserializeObject(Of DataTable)(jSonOutput)

Data in the input column is similar to like this.

Column0
12
13
14
1D
12M
16
17

Hi @sravya_vankadaru

1D is not Int, so you would have to deserialize the json into string

Column0 has a combination of intergers and strings. How do we do that ?

There is any need to have the data in Int form? Else map the column to string

how do we map entire column in datatable to string.
I tried - >

dt=(From row In dt.Select Order By Convert.ToString(row(“Column10”)) Ascending Select row).ToArray.CopyToDatatable()

Unfortunately it is not getting converted to String type. The data type still shows as system.object

were you able to resolve this error? Please post the solution if you found any.

Thanks :slight_smile: