Newtonsoft.Json JsonConvert To Datatable

后端 未结 2 1354
栀梦
栀梦 2020-12-20 05:09

I have a code like this,

DataTable dt = new DataTable();

string data = \"{\\\"ProductId\\\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,         


        
2条回答
  •  一整个雨季
    2020-12-20 05:41

    Your json must be an array of objects to be converted to a DataTable, it must start like this :

    "[{\"ProductId\..........
    

    end ends like this:

    ....,\"fieldName\":Value}]"
    

提交回复
热议问题