Simple powershell functions to convert from and to json. Very lightweight, will be supported with every powershell version. No dependences.
Simple powershell functions to convert from and to json. Very lightweight, will be supported with every powershell version. No dependencies.
Can convert any json data to powershell data structure.
$JSON = Get-Content .\data.json -Encoding utf8
$a = $JSON | ConvertFrom-JSON-Stable
$a.GetType().Name
$a[0].prop += 1
$b = $a | ConvertTo-JSON-Stable
Set-Content -Path .\data.json -Value $b -Encoding utf8