Skip to content

Latest commit

 

History

History

Array-as-PSObject

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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