-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
PwshOutCSON/ConvertTo-CSON.ps1
Line 180 in 433198f
| } elseif ($(if($item -is [Collections.IDictionary]) { $item.get_Keys().Count } else { @($item.psobject.get_Properties()).Count } ) -gt 0) { |
On the array obtained from get_Properties(), use Length property, which is the real property, instead of Count which is a PowerShell automatic property.
While there,
PwshOutCSON/ConvertTo-CSON.ps1
Line 189 in 433198f
| foreach ($property in $item.psobject.Properties) { |
Should use method get_Properties() instead of property Properties, but possibly optimize by capturing the array returned while counting the number of available properties in the previous invocation.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request