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

Replace Json.NET with SpanJson #10

Open
hez2010 opened this issue Mar 27, 2019 · 2 comments
Open

Replace Json.NET with SpanJson #10

hez2010 opened this issue Mar 27, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@hez2010
Copy link

hez2010 commented Mar 27, 2019

.NET Core 2.1 and .NET Standard 2.1 have introduced new APIs Span<T> and Memory<T> which provide high-performance memory access and operation, and SpanJson (see: https://github.com/Tornhoof/SpanJson) is a json library which uses Span<T> to accelerate the json parsing process.
Hope that aliyun-log-dotnetcore-sdk can replace Json.NET with SpanJson to improve its performance and throughput.

Note that the default behavior of serializing an Enum in SpanJson is to convert the enum value to string, which is different from Json.NET, so you may need to create a CustomFormatter (see: Tornhoof/SpanJson#112) to keep previous behavior.

Thanks!

@JasonMing
Copy link
Collaborator

I will consider to separate the part of json serialization and make it be able to adapt different json libraries.
But it may take a long time.

@JasonMing JasonMing self-assigned this Mar 28, 2019
@JasonMing JasonMing added the enhancement New feature or request label Mar 28, 2019
@JasonMing
Copy link
Collaborator

System.Text.Json is in rc stage now, I will migrate the json part to that library after they release.

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

No branches or pull requests

2 participants