Hi @Jim Olewis
From the official document, we can see that the System.Text.Json doesn't provide built-in support for the DataTable and related types.
So, you can try to use NewtonsoftJson
package to serialization the data table in asp.net core application.
Try to install the Microsoft.AspNetCore.Mvc.NewtonsoftJson
via the NuGet package.
Then, register the AddNewtonsoftJson()
method in the program.cs file:
builder.Services.AddControllers().AddNewtonsoftJson();
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion