JsonSubTypes
JsonSubTypes copied to clipboard
Support for System.Text.Json
Could you update the application so it supports the default json formatter in .Net core 3?
+1 would be useful to support System.Text.Json
. However I'm not sure if that library has the ability to do this yet.
First of all, Hi
Then yes it something that may comes some day, it needs some time to dig into the new api, I may look into into it in the future
Hi ;)
This would actually be quite useful since System.Text.Json
doesn't support anything like that at the moment :)
@brechtvhb: Could this issue be renamed to "Support System.Text.Json", since JsonSubTypes supports Json.NET just fine in .NET Core 3?
If your like me and just updated your project to .netcore 3.1 and now your types wont serialize correctly.
just install https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.NewtonsoftJson and you should be good to go.
@manuc66 Just wanted to check what the current roadmap for this feature is and if it still planned?
.NET 5 has enhanced System.Text.Json and it seems to be sufficient for most cases, allowing projects to avoid adding another dependency through Newtonsoft.
@manuc66: Do you have an overview of what's missing on https://github.com/manuc66/JsonSubTypes/compare/feature/Text.Json.NETCore3__%238? Perhaps we can contribute to it. :-)
@kimsey0 If you open the branch https://github.com/manuc66/JsonSubTypes/tree/feature/Text.Json.NETCore3__%238 I've began implementing a new converter agains System.Text.Json in project JsonSubTypes.Text.Json. I've kept 62 tests and there are currently 27 failing.
Using multiple time the deserializer in the same json path/hierachy does not work
@kimsey0 The issue with recursive polymorphic deserialization has been solved.
Other feature are still missing (see failing tests)
Please note that this kind of feature is coming in System.Text.Json https://github.com/dotnet/runtime/issues/63747
Unaware of this package I implemented this: https://github.com/riezebosch/PolymorphicJsonTypeInfoResolver 🤘🏻