serilog-formatting-compact-reader
serilog-formatting-compact-reader copied to clipboard
Newtonsoft.Json -> System.Text.Json
First quick and dirty attempt to migrate from Newtonsoft.Json to System.Text.Json
See #22 and https://github.com/datalust/seq-api/issues/125
@nblumhardt WARNING: this PR is for your reference only: please review it carefully!!!! All the tests on this repo are passing, but probably there are some API names are no more correct. i.e.
https://github.com/serilog/serilog-formatting-compact-reader/blob/b678843008ceeaedda8d833e626648d716114d4c/src/Serilog.Formatting.Compact.Reader/LogEventReader.cs#L109
now becomes https://github.com/serilog/serilog-formatting-compact-reader/blob/4f1918cf5b5fa74492ed0f7cada63de102de1752/src/Serilog.Formatting.Compact.Reader/LogEventReader.cs#L123
but probably the name ReadFromJsonElement is more appropriated than ReadFromJObject
obviously there are also breaking changes when the public API references Newtonsoft.Json
This looks like a great start, thank you Giuseppe! I'll dig thoroughly into this and try to push it forward before moving over to the other PR.
We'll shortly be releasing a new version of Serilog.Formatting.Compact.Reader to support Serilog 3.1 (with the addition of built-in trace and span ids), so the best time to merge will be after the dust has settled on that one, in a month or so, I think.
Is this likely to go any further in the near future? (not sure how risky it is, just wondering in the context of a major version bump for Serilog 4)
I don't think this will be achievable in the post-Serilog-4 package rollout, needs more analysis.