Adds support for logging System.Text.Json dynamic types as structured data with Serilog. For JSON.NET dynamic types see this repo.
Install from NuGet:
Install-Package Destructurama.SystemTextJson
Modify logger configuration:
var log = new LoggerConfiguration()
.Destructure.SystemTextJsonTypes()
...
Any System.Text.Json dynamic object can be represented in the log event's properties:
var obj = JsonSerializer.Deserialize<dynamic>(someJson);
Log.Information("Deserialized {@Obj}", obj);
The results are available here.