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

Fix Issue with Serializing Type When Using System.Text.Json #151

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

KyleMcMaster
Copy link
Collaborator

@KyleMcMaster KyleMcMaster commented Oct 6, 2023

Description of Changes:

Fixes #91
Fixes issue with lack of support for serialization of Type when using System.Text.Json's serializer by removing the property from the exported json altogether. Unit tests show output of serialization for reference.

Pros:

  • Fixes issue
  • Makes Type an expression which simplifies Result's available API and reduces code (which appeared to be unused based on Samples, Docs, and Tests).

Cons:

  • Adds additional but compatible dependency on System.Text.Json to core Ardalis.Result for .NET Standard users. This is already a "baked in" dependency in .NET 7 version.

https://www.nuget.org/packages/System.Text.Json/7.0.3#supportedframeworks-body-tab

Did you add tests?

  • - Yes
  • - No

If no, why not?

N/A

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Code Coverage

Package Line Rate Branch Rate Complexity Health
Ardalis.Result 90% 93% 77
Summary 90% (171 / 191) 93% (13 / 14) 77

@KyleMcMaster KyleMcMaster self-assigned this Oct 6, 2023
@KyleMcMaster KyleMcMaster added the bug Something isn't working label Oct 6, 2023
@ardalis ardalis merged commit dae5fba into main Oct 6, 2023
1 check passed
@KyleMcMaster KyleMcMaster deleted the kylemcmaster/91-result-serialization branch October 30, 2023 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants