How to convert json into datatable?

前端 未结 5 730
暗喜
暗喜 2020-11-27 21:17

Does anyone know how to convert a json string into DataTable from asp.net? I came to know about the Deserialize, it needs the class, I just want the datatable as returned. C

5条回答
  •  伪装坚强ぢ
    2020-11-27 21:48

    I am not sure which JSON library you are using, but you might want to take a look at JSON.NET as there is a converter object type in there called this:

     Newtonsoft.Json.Converters.DataTableConverter
        // Summary:
        //     Converts a System.Data.DataTable to and from JSON.
    

    I have not used this functionality before but you could have a go with it.

提交回复
热议问题