This is the new JSON library from Microsoft, which concentrates on performance (speed and minimal allocations).
I did a quick trial of integrating via ISerializer abstraction and some findinds.
Marten has following contract https://github.com/JasperFx/marten/blob/master/src/Marten/ISerializer.cs
whereas JsonSerializer has a bit different kind of expectations https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializer?view=netcore-3.1
Related to #885
My thinking is to hive off the Json.NET serializer as a seperate assembly. This way, Marten library does not have a direct dependency on Json.NET. Also potentially reducing diamond dependency issues.
Once this is done, it makes it easier for implementing and wiring other serializers including unit tests.
Since these are breaking changes, we have to tackle this in 4.x milestone.
Note that I have already done the work to seperate the Json.NET serializer portion and will plan to send a PR when we start dev work on 4.x.
@mysticmind I'm going to disagree with splitting the Newtonsoft serializer support off the main lib. Having the Newtonsoft support out of the box gives us a very quick getting started story.
@jeremydmiller I agree with your point of view on the ease of getting started but my primary impetus to hive off was around reducing diamond dependency issues.
Most helpful comment
My thinking is to hive off the Json.NET serializer as a seperate assembly. This way, Marten library does not have a direct dependency on Json.NET. Also potentially reducing diamond dependency issues.
Once this is done, it makes it easier for implementing and wiring other serializers including unit tests.
Since these are breaking changes, we have to tackle this in 4.x milestone.
Note that I have already done the work to seperate the Json.NET serializer portion and will plan to send a PR when we start dev work on 4.x.