-
Notifications
You must be signed in to change notification settings - Fork 464
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
Library should include both Json.Net and System.Text.Json serialziers #420
Comments
System.Text.Json is supported for .net fw 4.6.2 up to .net 6 So you mean for those versions there should be an option to use either that or Json.net? |
Yes, I'm thinking if we should include both serialziers into the assembly and the user would have a choice. Tests must be updated to test everything against both serialziers too, that might be the most tedious change of all |
Alright, the tests can use some kind of parameterized test where the input is which serializer to use so we get everything tested twice. Question is what should be used per default, one idea could be to use System.Text.Json where it is supported and Json.Net where it's not supported. |
Yes, I was also thinking about a parameterized tests. However it might not work for those which are already parameterized, and iirc there are already few of them. Another option might be a base class. But again iirc MSTest doesn't like them and ignore the attributes when they aren't declared at a leaf of the inheritance tree. I think the new serialzier must the default option but the other option should still be available. In next version we can move it to a separate project, effectively decreasing the number of dependencies. To finally fullfil #76. |
Yeah, having subclasses with MSTest is a pain I have experienced it myself firsthand :) Perhaps we can migrate to Xunit for the tests so we easier can have subclasses for the tests. We can use Microsoft.Extensions.DependencyInjection and just have the DI resolve the injection of the correct serializer the user have choosen. Microsoft.Extensions.DependencyInjection supports .net 4.6.2 the same as system.text.json so if we are on lower .net we just use JSON.net. |
Yes :(
Let's don't. I don't think it's worth the effort, plus I've already migrated to it and then from it. Don't want to go through this exercise all over again.
Yes, I like this idea! |
I'm going on vacation tomorrow so I don't think I'll have to much time to look into getting some DI. What made you leave xunit? I have only good experiences with it |
Ping on this idea. |
I got back from vacation this week so I'll take a look in a few days. What made you abandon xunit btw? |
tbh, I don't remember what was the exact trigger. I always liked MSTest but back then it didn't support dynamic test data, xUnit did so I've switched. But then MSTest added the support and I've switched back. Plus a better VS and ADO integration and native support, if you will. Also I work for Microsoft so don't mind using Microsoft own tools whenever possible :) |
After the recent changes, it includes one or another.
@hartmark we've made it too opinionated: either one or another. How about somehow allow both options on the platform whether that's possible?
The text was updated successfully, but these errors were encountered: