I have converted the following JSON file to powershell representation object.
{ \"computer\": [ { \"children\": [ {
Just pipe it to Set-Content, or Out-File:
Get-Process powershell | ConvertTo-Json | Set-Content json.txt