Is there a way to make Serilog format structured data into a formatted output?
I've been using structured data structures in Serilog lately and even though there is an advantage of it being compact large data structures (5 properties or more) are hard to read in the console/file without formatting it later.
Hypothetically I'd only enable this on dev.
https://github.com/serilog/serilog/wiki/Structured-Data
From this:
{ "Fruit": ["Apple", "Pear", "Orange"] }
To this:
{
"Fruit": [
"Apple",
"Pear",
"Orange"
]
}
Edit:
Currently I'm using JsonConvert.SerializeObject({...}, Formatting.Indented)
but I'd like to move away from this for reasons like proper coloring from the console package, faster serialization, deferred serialization etc.