How to Convert Datatable into Json object


#1

Hi

Is any Activity in UIPath which will convert Datatable into Json object ? Do you have any reference or example which shows datatable conversion into Json objects.

Thanks,
Ranjan


#2

Did you try JsonConvert.SerializeObject(DataTable)


#3

This should work.

Do note that DataTable and JSON serialization have corner cases that don’t play nice with each other (deseriaized schema is completely based on first row).


#4

I couldnt get this to work. Could anyone assist with examples on how to convert a DATA TABLE to JSON? Or even CSV to JSON in UIPATH?

Thank!


4. RPA Challenge - Json Parsing
#5

#6

There is a bug when first trying to use the JsonConvert.SerializeObject. The function reads as an error until you create a variable of type JsonConvert. You can delete the variable afterward.