【发布时间】:2020-07-30 14:31:42
【问题描述】:
我有一个包含 HTML 字符串的 JSON 文件,并一直在使用 PowerShell 对其进行操作,但是每次我将其转换回 JSON 时,都会使 HTML 字符串不再相同。
确实需要一些帮助。谢谢! 这是我的 JSON:
{
"count": 1,
"value": [
{
"id": 1,
"fields": {
"System.Description": "<div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><span style=\"font-size:10.0pt;font-family:"Arial",sans-serif;\"><div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><span style=\"font-size:10.0pt;font-family:"Arial",sans-serif;\"><span style=\"font-family:Arial, sans-serif;background-color:rgb(255, 255, 255);display:inline !important;\">Decision has been made to use HLS video format</span><br></span></div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><span style=\"font-size:10.0pt;font-family:"Arial",sans-serif;\"><span style=\"font-family:Arial, sans-serif;background-color:rgb(255, 255, 255);display:inline !important;\"><br></span></span></div><p style=\"margin:0cm 0cm 8pt;font-size:11pt;font-family:Calibri, sans-serif;margin-bottom:0cm;margin-bottom:.0001pt;text-autospace:none;\"><span style=\"font-size:10.0pt;font-family:"Arial",sans-serif;\">We\ncan’t use YouTube or Vimeo to serve the videos because analytics required.</span></p></div>We\nneed to use an HTML5 Player in the Desktop web app</span></div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><span style=\"font-size:10.0pt;font-family:"Arial",sans-serif;\"><br></span></div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><br></div><div style=\"margin:0px 0cm 0.000133333px;font-size:11pt;font-family:Calibri, sans-serif;\"><br></div></div><br>",
}
}
]}
【问题讨论】:
-
您好,欢迎来到 StackOverflow。请花一些时间阅读帮助页面,尤其是名为"What topics can I ask about here?" 和"What types of questions should I avoid asking?" 的部分。更重要的是,请阅读the Stack Overflow question checklist。您可能还想了解Minimal, Complete, and Verifiable Examples。
标签: html json string powershell devops