Skip to content
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

Switch more over to System.Text.Json #9819

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Feb 21, 2025

  • JsonElement is read only. This is why we convert them to JsonNode.
  • JsonNode.Parse does NOT have the same features as JsonDocument.Parse. e.g you CANNOT tell it to ignore trailing comma's. It will just throw an exception. This is the reason why we have to load the .json via JsonDocument and then call the extension method .ToNode () on the Root JsonElement to convert it to a JsonNode. (We use JsonNode to do the merging).

@dellis1972 dellis1972 force-pushed the dev/dellis1972/systemtextjson branch from 06ec5dd to 7fda7e5 Compare February 21, 2025 16:42
@dellis1972
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dellis1972 dellis1972 marked this pull request as ready for review February 25, 2025 16:01
@dellis1972 dellis1972 requested a review from jonpryor as a code owner February 25, 2025 16:01
@@ -116,7 +116,6 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Options.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Mono.Options.pdb" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)MULTIDEX_JAR_LICENSE" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Newtonsoft.Json.dll" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, is System.Text.Json in the pack?

It would be needed for .NET framework.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. Probably. We need to figure out how to get #9727 and #8746 working so we can test under .NET framework to catch all this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants