DataTable to JSON

前端 未结 3 1109
悲&欢浪女
悲&欢浪女 2020-11-30 08:00

I recently needed to serialize a datatable to JSON. Where I\'m at we\'re still on .Net 2.0, so I can\'t use the JSON serializer in .Net 3.5. I figured this must have been

3条回答
  •  时光说笑
    2020-11-30 08:13

    I found this: http://www.bramstein.com/projects/xsltjson/ You can convert your datatable to xml and use a xslt stylesheet to convert the xml to json.

    It is more a workaround than a real solution.

提交回复
热议问题