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

way to switch between Newtonsoft, and Utf8Json in abp 5.9.0 #5634

Closed
lockcd opened this issue Jun 3, 2020 · 7 comments · Fixed by #6679
Closed

way to switch between Newtonsoft, and Utf8Json in abp 5.9.0 #5634

lockcd opened this issue Jun 3, 2020 · 7 comments · Fixed by #6679
Assignees
Labels
Milestone

Comments

@lockcd
Copy link

lockcd commented Jun 3, 2020

Documentation

Utf8Json - Fast JSON Serializer for C#
Please check the official documentation before asking questions:
https://github.com/neuecc/Utf8Json

@maliming
Copy link
Member

maliming commented Jun 4, 2020

Many components of the framework depend on Newtonsoft, and it is not easy to switch to other libraries.

I remember that Microsoft's System.Text.Json is missing some features. I think Utf8Json may be too.

@maliming maliming added this to the Backlog milestone Jun 4, 2020
@lockcd
Copy link
Author

lockcd commented Jun 5, 2020

For serialization, Utf8Json is 2 times faster than System.Text.Json and a whole 4 times faster than Newtonsoft. For deserialization, Utf8Json is 3.5 times faster than System.Text.Json and 6 times faster than Newtonsoft.

The only surprise here is how poorly Newtonsoft.Json performed. This is probably due to the UTF-16 and UTF-8 issue. The HTTP protocol works with UTF-8 text. Newtonsoft converts this text into .NET string types, which are UTF-16. This overhead is not done in either Utf8Json or System.Text.Json, which work directly with UTF-8.
https://michaelscodingspot.com/the-battle-of-c-to-json-serializers-in-net-core-3/

@ismcagdas
Copy link
Member

As I can see, this project is not very active as well, https://github.com/neuecc/Utf8Json/graphs/contributors

@lockcd
Copy link
Author

lockcd commented Dec 12, 2020

@maliming
Copy link
Member

System.Text.Json still has some features to be implemented.

Wait for dotnet/runtime#36785

@ymg2006
Copy link
Contributor

ymg2006 commented Mar 11, 2023

Dear @maliming and @ismcagdas Issue #36785 is closed as completed in .net7.

@maliming
Copy link
Member

Dear @maliming and @ismcagdas Issue #36785 is closed as completed in .net7.

I think we can now consider using System.Text.Json to replace Newtonsoft.

@maliming maliming self-assigned this Mar 19, 2023
@maliming maliming modified the milestones: Backlog, v8.2 Mar 19, 2023
maliming added a commit that referenced this issue Mar 21, 2023
@ismcagdas ismcagdas modified the milestones: v8.2, v8.3 May 8, 2023
@ismcagdas ismcagdas modified the milestones: v8.3, v8.4 Jul 27, 2023
@ismcagdas ismcagdas modified the milestones: v8.4, v9.0 Oct 4, 2023
@ismcagdas ismcagdas modified the milestones: v9.0, v9.1 Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants