How to Convert Datatable into Json object



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.



Did you try JsonConvert.SerializeObject(DataTable)


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).


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?


4. RPA Challenge - Json Parsing


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.