title: How to save a JSON object to a file using Powershell?
body: <p>I have converted the following JSON file to powershell representation object.</p>
  
  <pre><code>{
  "computer": [
      {
          "children": [   
              {   
                  "children": [ {
                     "children": [ {
                          "path": "T:\Dropbox\kvaki.html",
                          "name": "kvaki",
                          "type": "url",
                          "url": "http://example.com"
                     } ],
                      "path": "T:\Dropbox\",
                      "name": "Njusha",
                      "type": "folder"
                  }, {
                      "path": "T:\Dropbox\Europa.html",
                      "name": "Europa",
                      "type": "url",
                      "url": "http://example.com"
                  }, {
                      "path": "T:\Dropbox\math.html",
                      "name": "math",
                      "type": "url",
                      "url": "http://example.com"
                  } ],
                  "path": "T:\Dropbox\",
                  "name": "Money",
                  "type": "folder"
              }
          ],
          "full_path_on_file_sys": "T:\Dropbox\"
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>After doing some computations with powershell representation I would like to save it to file as JSON. 
  But command <code>$jsonRepresentation | ConvertTo-Json | Out-File "D:\dummy_path\file.json"</code> saves it in this way</p>
  
  <pre><code>{
      "computer":  [
                       {
                           "children":  " ",
                           "full_path_on_file_sys":  "T:\Dropbox\"
                       }
                   ]
  }
  </code></pre>
  
  <p><strong>Question: how to achieve correct saving of complex powershell JSON representation?</strong> </p>