Powershell ConvertTo-JSON missing nested level

前端 未结 1 1464
有刺的猬
有刺的猬 2020-11-30 15:06

It looks like Powershell cuts off data when exporting to JSON if it nests too deep. My object hierchy looks like this:

Main Object
    Metadata
    More Met         


        
相关标签:
1条回答
  • 2020-11-30 15:27

    From Get-Help ConvertTo-JSON:

    -Depth <Int32>
    Specifies how many levels of contained objects are included in the JSON representation. The default value is 2.

    Set your -Depth parameter whatever depth you need to preserve your data.

    0 讨论(0)
提交回复
热议问题