Skip to content

Files

Latest commit

26d924e · Jan 1, 2023

History

History
16 lines (10 loc) · 609 Bytes

File metadata and controls

16 lines (10 loc) · 609 Bytes

ConvertTo-Json Array as PSObject

Fixed in v6

If an array is assigned to a variable declared as [PSObject] and this variable is piped to ConvertTo-Json then the result JSON does not represent the original array. It is some sort of wrapper around it.

Scripts


  • windowsserver.uservoice.com/forums/301869-powershell/suggestions/15123162-convertto-json-doesn-t-serialize-simple-objects-pr