Deserialize JSON: Error converting value "11-222-33" to type 'System.Double'. Path '[1]['Order Number (*)']', line 1, position 908

I have a process in which I serialize a data table and upload it to the queue, when unrealizing it gives me this error:

Deserialize JSON: Error converting value “11-222-33” to type ‘System.Double’. Path ‘[1][‘Part Number (*)’]’, line 1, position 908.

It is because just in the previous line he serialized it like this:

“[{“Name”:null,“City”:10.0,“Order Number ()":670310.0,"Cantidad ()”:1.0,l,“Resultado”:null,“Observaciones”:null}]”

And it should be like this:

“[{“Name”:null,“City”:10.0,“Order Number ()":“670310”,"Cantidad ()”:1.0,l,“Resultado”:null,“Observaciones”:null}]”

Can someone help me?

Where could the problem be?

@Marisa_Ontiveros1,

What’s the source of the DataTable? if it’s from Excel file then while reading it using Read Range activity, check the Preserve format checkbox.

It seems the Datatable contains the data in Double then while serializing it’s being passed as double but when we deserialize it, it’s not able to read few data to Double.

I would suggest to check the DataTable source for incorrect datatype.

Thanks,
Ashok :slight_smile:

1 Like

please use the </> format button from editor when sharing snippets or share it additional as text file

check in the datatable in which column the 11-222-33 is present and what other values are present

we assume: unrealizing = deserializing

due the fact that the first row is used for the data column datatype calculation is used a lter occuring string 11-222-33 will conflict as it is not a double

we can do:

  • fixing the Json before derserializing
    OR
  • manuall construct and populate the datatable

Thank you very much!!! Works!!!
ç

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.