Created
October 10, 2023 18:16
-
-
Save jskeet/aed9d9f484440e680f4481018fc37fdf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using System.Data; | |
var dt = new DataTable | |
{ | |
Columns = { "id", "name" }, | |
Rows = { { "x", "y" } } | |
}; | |
string json = JsonConvert.SerializeObject(dt); | |
Console.WriteLine(json); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment