-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json.JsonSerializer does not support System.Data.DataTable #41920
Comments
Tagging subscribers to this area: @roji, @ajcvickers |
I'd say that this is by design and the exception-message is pretty clear about it: |
Related issue #29959 |
@ANahr So I'm going to keep using the JsonConvert? |
You may want to look at the recently published security guidance for DataTable serialization. The article even directly mentions how using Newtonsoft.Json's |
Closing as dup of https://github.com/dotnet/runtime/issues/29959. Triage - https://github.com/dotnet/runtime/issues/29959#issuecomment-690595375. |
Description
I want to serialize a DataTable use JsonSerializer:
and it throws an exception:
When I serialize the DataTable use JsonConvert, it works fine.
I will get the json as below:
Other information
The text was updated successfully, but these errors were encountered: