title: Powershell ConvertTo-JSON missing nested level
body: <p>It looks like Powershell cuts off data when exporting to JSON if it nests too deep. My object  hierchy looks like this:</p>
  
  <pre><code>Main Object
      Metadata
      More Metadata
      Collection of Other object Sources
          Collection of data used by these sources
  </code></pre>
  
  <p>For some reason, when I convert to JSON, powershell exports the Third level (Collection of data used by these sources) as an empty string, even though it is an array of objects with various NoteProperties added to them. For example:</p>
  
  <pre><code>$test = New-Object -TypeName PSObject
  
  $obj = New-Object -TypeName PSObject
  $obj | Add-Member -MemberType NoteProperty -Name "Name" -Value "adsf"
  
  $test2 = New-Object -TypeName PSObject
  $test2 | Add-Member -MemberType NoteProperty -Name "ArrayTest" -Value @($obj, $obj)
  
  $test3 = New-Object -TypeName PSObject
  $test3 | Add-Member -MemberType NoteProperty -Name "ArrayTest" -Value @($obj, $obj, $obj)
  
  $test | Add-Member -MemberType NoteProperty -Name "CollectionTest" -Value @($test2, $test3)
  </code></pre>
  
  <p>This results in the following JSON String:</p>
  
  <pre><code>PS C:\Users\user\projects\Powershell&gt; $test | ConvertTo-Json
  {
      "CollectionTest":  [
                             {
                                 "ArrayTest":  " "
                             },
                             {
                                 "ArrayTest":  "  "
                             }
                         ]
  }
  </code></pre>
  
  <p>Converting to XML results in a similar situation:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;Objects&gt;
    &lt;Object Type="System.Management.Automation.PSCustomObject"&gt;
      &lt;Property Name="CollectionTest" Type="System.Object[]"&gt;
        &lt;Property Type="System.Management.Automation.PSCustomObject"&gt;
          &lt;Property Type="System.String"&gt;@{ArrayTest=System.Object[]}&lt;/Property&gt;
          &lt;Property Name="ArrayTest" Type="System.Management.Automation.PSNoteProperty"&gt;System.Object[]&lt;/Property&gt;
        &lt;/Property&gt;
        &lt;Property Type="System.Management.Automation.PSCustomObject"&gt;
          &lt;Property Type="System.String"&gt;@{ArrayTest=System.Object[]}&lt;/Property&gt;
          &lt;Property Name="ArrayTest" Type="System.Management.Automation.PSNoteProperty"&gt;System.Object[]&lt;/Property&gt;
        &lt;/Property&gt;
      &lt;/Property&gt;
    &lt;/Object&gt;
  &lt;/Objects&gt;
  </code></pre>
  
  <p>Is there some sort of object nesting limitation in powershell?</p>