很着急 为什么我的ConvertFrom-Json会出错,我要取json的值该怎么取,私信我
今日份疑惑。
$Getjsonfilecontent | ConvertTo-Json -Depth 100 | Out-File $Updatedleafjsonpath -Force
# Remove unwanted Pattern
$ReplacePatterns = @{
"\u003c" = "<"
"\u003e" = ">"
"\u0027" = "'"
}
$InputJson = Get-Content -Path $Getjsonfilecontent | Out-String
foreach ($Pattern in $ReplacePatterns.GetEnumerator())
{
$InputJson = $InputJson -replace $Pattern.Key, $Pattern.Value
}
$InputJson | Out-File -FilePath $Updatedleafjsonpath