I have converted the following JSON file to powershell representation object.
{ \"computer\": [ { \"children\": [ {
If you want to both view the output and save it to file, you can pipe the tee command.
Get-Process powershell | ConvertTo-Json | Tee-Object json.txt