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

Use System.Text.Json instead of Newtonsoft #249

Open
insomniachi opened this issue Jun 13, 2024 · 3 comments
Open

Use System.Text.Json instead of Newtonsoft #249

insomniachi opened this issue Jun 13, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@insomniachi
Copy link

  • Faster
  • Native AOT
  • Part of BCL
@insomniachi
Copy link
Author

closing as this was previously posted by other people and rejected.

@Lachee
Copy link
Owner

Lachee commented Jun 18, 2024

Times have changed and im not against it any more.
However it has some requirements that will need to be met:

  • AOT ( which you said it has )
  • Cross Platform ( must work on Linux, Windows, and MacOS )
  • Compatible with Unity3D ( the current solution is to use the Newtonsoft.JSON package provided by unity )
  • Support .NET FX 4 ( a older requirement, but many monogames still use this ).

@Lachee Lachee reopened this Jun 18, 2024
@Lachee Lachee added enhancement New feature or request help wanted Extra attention is needed labels Jun 18, 2024
@AceiusIO
Copy link

I suppose you could have some kind of interface for serialization, and then implement one for Newtonsoft and one for System.Text. At compile time, you could build a Newtonsoft compatible version and a System.Text compatible version, and use a preprocessor directive to choose which one to instantiate. The Newtonsoft JsonProperty annotations would also have to be complimented by JsonPropertyName annotations for System.Text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants