Clean JSON output for ConvertTo-Json

PowerShell 5.1 has nice cmdlet called ConvertTo-Json that converts objects to JSON syntax. Unfortunately, this conversion isn’t very clean. It contains tons of extra white space and querying JSON is not possible for most of the tools including PowerShell. PowerShell-Core 7 received a major update on cmdlet. It actually converts objects into clean JSON code.…