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

Decide for one json serializer package #2721

Open
SolidProgramming opened this issue Dec 12, 2024 · 2 comments
Open

Decide for one json serializer package #2721

SolidProgramming opened this issue Dec 12, 2024 · 2 comments
Assignees

Comments

@SolidProgramming
Copy link
Contributor

SolidProgramming commented Dec 12, 2024

Regarding the issue #2540 i found out that we often use two json serializers: Newtonsoft.Json and System.Text.Json.
Because of that we always need to add two attribute classes when defining custom property naming for serialization/deserialization. E.g.: [JsonProperty("sid"), JsonPropertyName("sid")]

@abarz722 & @tpurschke do you see any potential caveats im missing? The RestSharp Rest Client is using it's own namespace for the serializers...

I would go for System.Text.Json package because this is no extra package and directly maintained by MS. But System.Text.Json offers fewer flexibility that we might need. If yes, we go for Newtonsoft

@SolidProgramming SolidProgramming self-assigned this Dec 12, 2024
@SolidProgramming SolidProgramming changed the title Decide for one json serializer package and remove the other Decide for one json serializer package Dec 12, 2024
@tpurschke
Copy link
Contributor

@NilsPur says: class System.Text.Json.Serialization can be removed
best to auto-remove all JsonPropertyName occurances in our code using regular expressions

@SolidProgramming
Copy link
Contributor Author

@NilsPur says: class System.Text.Json.Serialization can be removed best to auto-remove all JsonPropertyName occurances in our code using regular expressions

Alright. Should be no problem.

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

No branches or pull requests

3 participants