title: Powershell convert to Json is bad format
body: <p>I am using win_shell to convert powershell output to json format, so that i can filter it later. The problem is i am getting bad Json format. </p>
  
  <p>Here is the code</p>
  
  <pre><code>    - win_shell: |
           Get-ChildItem -Path &lt;some_path&gt; |
           Where-Object {$_.PSIsContainer} | Sort-Object LastWriteTime -Descending |
           Select-Object -First 20 | ConvertTo-Json
           register: register_results
  
       - debug:
           var: register_results
  </code></pre>
  
  <p>The stdout lines i am getting is not clean to be used in a json filter:  </p>
  
  <pre><code>  "stderr": "",
    "rc": 0,
    "stdout_lines": [
        "[",
        "    {",
        "        \"Name\":  \"976\",",
        "  \"FullName\"\"F:\\\\some\\\\path\\\\to\\\\folder\\\\976\",",
        "  \"Parent\":  {",
        "                       \"Name\":  \"first\",",
        "                       \"Parent\":  \"All\",",
        "                       \"Exists\":  true,",
        "                       \"Root\":  \"F:\\\\\",",
        "                       \"Extension\":  \"\",",
        etc...
  </code></pre>
  
  <p>Those extra whitespaces cause errors when i try to filter for example "parent" or "Name". Looks like there must be other parameter beside "ConvertToJson"to get the output cleaner. </p>
  
  <p>Is there anyway to do that?</p>