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

Added option to select serializer #433

Merged
merged 48 commits into from
Sep 8, 2022

Conversation

hartmark
Copy link
Contributor

Fixes #420

  • Changed so we always import JSON.net and added conditional just for System.Text.Json on newer dotnets.
  • Opened up the JsonSerializerFactory so we can set another serializer if wanted.

I wanted to create a simple test for checking that the correct class was used as default.
I however noted that all tests returned it was using SystemTextSerializer even on the older dotnets.
See the Serializer_Should_Use_Correct_Default test.

src/JWT/Builder/JwtBuilder.cs Outdated Show resolved Hide resolved
src/JWT/Serializers/JsonSerializerFactory.cs Outdated Show resolved Hide resolved
tests/JWT.Tests.Common/SerializerTests.cs Outdated Show resolved Hide resolved
src/JWT/Serializers/JsonSerializerFactory.cs Outdated Show resolved Hide resolved
@hartmark
Copy link
Contributor Author

It was indeed using the JSON.net serializer now with latest push in the net40 unittest project.

@hartmark hartmark requested a review from abatishchev August 27, 2022 00:16
src/Directory.Build.targets Show resolved Hide resolved
src/JWT/Builder/JwtBuilder.cs Outdated Show resolved Hide resolved
src/JWT/Serializers/JsonSerializerFactory.cs Outdated Show resolved Hide resolved
@hartmark hartmark requested a review from abatishchev August 28, 2022 22:27
@hartmark
Copy link
Contributor Author

hartmark commented Sep 6, 2022

@abatishchev Any status for this PR?

@abatishchev
Copy link
Member

Sorry to make you waiting! Will come back to it tonight, if not then shortly.

@abatishchev abatishchev merged commit 2e2c9c0 into jwt-dotnet:main Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Library should include both Json.Net and System.Text.Json serialziers
2 participants