Prettifying a JSON String in .NET using Json.NET
string jsonFormatted = JValue.Parse(json).ToString(Formatting.Indented);
string jsonFormatted = JToken.Parse(json).ToString(Formatting.Indented);
References
https://weblog.west-wind.com/posts/2015/mar/31/prettifying-a-json-string-in-net
https://stackoverflow.com/questions/54816674/how-to-write-a-json-file-in-pretty-format-using-net