skip to Main Content

Powershell ConvertFrom-Json unexpectedly produces a string instead of object array from single item array containing a string

File "array.json": ["bogus"] PS C:UsersMe> (Get-Content "array.json" | ConvertFrom-Json -NoEnumerate).GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Object[] System.Array PS C:UsersMe> (Get-Content "array.json" | ConvertFrom-Json).GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True String System.Object…

VIEW QUESTION
Back To Top
Search