-1

I am trying to deserialize jsonoutput 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

Tom
  • 16,842
  • 17
  • 45
  • 54
Pavan Gunda
  • 57
  • 1
  • 7
  • 1
    You need to work on this question, Paste the actual json, or part there of. Paste the actual code, and the actual error message. Describe what you are actually trying to do – TheGeneral Dec 04 '20 at 09:33

1 Answers1

0

Column0 seems to contain string representations of timespans (1d = 1 day, 12M = 12 months).

You cannot deserialize this into an integer as it contains characters. Your target variable type should rather be a timespan. But then you also cannot easily deserialize these kind of strings.

Here's a link to a helper function that could probably work...