如何为 Powershell 格式化 Json 数据?

问题描述 投票:0回答:1

我如何格式化以下 json 正文以在 b powershell az cli 中发出休息请求? 它在json数据中有json数据,它与标准有点不同。

 {"Id":"1234","Name":"acme","Model":{"CustId":"789","CustName":","Roles": 
   ["admin"]},"SubscriptionId":1,"Email":"[email protected]"}

如何在 Powershell 中格式化它?

powershell
1个回答
0
投票

常规

ConvertFrom-Json
。但您发布的 JSON 只是损坏了(“CustName”值中缺少
"
),而不是不同的格式。

© www.soinside.com 2019 - 2024. All rights reserved.