PowerShell non riesco a corretta di andata e ritorno questo oggetto JSON:Come di andata e ritorno questo JSON per PSObject e schienale in PowerShell
{
"settings": {
"minimumApproverCount": 2,
"creatorVoteCounts": false,
"scope": [
{
"refName": "refs/heads/d14rel",
"matchKind": "Exact",
"repositoryId": "a290117c-5a8a-40f7-bc2c-f14dbe3acf6d"
}
]
}
}
Supponendo $json
è una stringa, questo comando:
$json | ConvertFrom-Json | ConvertTo-Json
produce il male JSON fuori di esso:
{
"settings": {
"minimumApproverCount": 2,
"creatorVoteCounts": false,
"scope": [
"@{refName=refs/heads/d14rel; matchKind=Exact; repositoryId=a290117c-5a8a-40f7-bc2c-f14db
e3acf6d}"
]
}
}
Avviso si ottiene il "campo di applicazione" sbagliato variabile. C'è un modo per risolvere questo problema?