You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure what's going on, but the substring workaround doesn't work anymore. On the other hand, $json | Out-String | ConvertFom-Json seems to work fine for reasons unbeknownst to me
Activity
joeyaiello commentedon May 6, 2016
#707 is somewhat related (PowerShell is using UTF-8 w/ a BOM by default and this is not the norm on *nix)
[-]PowerShell appends BOM to all UTF-8 strings[/-][+]PowerShell prepends BOM to all UTF-8 strings[/+]andyleejordan commentedon May 6, 2016
Having to do
$json = $response.substring(1) | convertfrom-jsonis really bad UX.joeyaiello commentedon May 11, 2016
Totally agreed. Filing a bug on Francisco Gamino (@Francisco-Gamino) to fix it in SD (unfortunately, he still has to live there because Nano).
andyleejordan commentedon May 16, 2016
Repro:
[-]PowerShell prepends BOM to all UTF-8 strings[/-][+]Fix ConvertFrom-Json to handle text with/without BOM[/+]joeyaiello commentedon Jul 20, 2016
Not sure what's going on, but the substring workaround doesn't work anymore. On the other hand,
$json | Out-String | ConvertFom-Jsonseems to work fine for reasons unbeknownst to mejoeyaiello commentedon Jul 21, 2016
Bruce Payette (@BrucePay) maybe you know what's going on here?
[-]Fix ConvertFrom-Json to handle text with/without BOM[/-][+]Fix ConvertFrom-Json to handle mutlilines[/+]vors commentedon Jul 26, 2016
This doesn't have to do anything with BOM actually.
Here is the simpler repro
Expected
Empty object (this is behaviour on Full PS)
Actual
Fix ConvertFrom-Json to handle mutlilines