从xshell复制的文本格式如下

  1. {"supportType":"202","prjRegion":"福建省福州市","enterpriseInfoAddressDTOList":
  2. [{"addressee":"liu","contactNumber":"15859302136","detailAddress":"福建省 福州市 鼓楼区wwwwww"}],"holderEntAddress":"北京","holderEntLicenseDoc":"http://124.71.179.222:8081/apiapp/sys/attachment/fileShow.do?attachBatch
  3. Id=436425003387711488&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489","openingBank":"11","prjPlan":33,"holderEntQuaDocList":[],"supperPrjCode":"","bidContract":50000,"holderIdno":"352228191237126316","holderLinkmanI
  4. dno":"352229198803180538","tendererProjectCode":"","holderName":"呜呜呜呜","holderEmail":"450969904@qq.com","holderLegalIdno":"352229198803180538","holderLegalIdcardDocFront":"http://124.71.179.222:8081/apiapp/sys/atta
  5. chment/file.do?attachId=426960&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489","openingBankAccount":"3333333","holderLinkmanMobile":"15859302136","guaranteeEnterpriseIdentity":"","bond":50000.0,"productCode":"ttttt5
  6. 55555","supperPrjName":"非投标保函","holderLinkmanName":"刘泽华","holderMobile":"11","insureNo":"446822356615557120","holderEntType":1,"holderLegal":"刘泽华","holderLegalIdcardDocBack":"http://124.71.179.222:8081/apiap
  7. p/sys/attachment/file.do?attachId=426961&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489","tradeCenter":"330822"}

大问题:有换行符

解决:

ctrl+h
输入\n()
点击正则
image.png
替换所有

小问题:

有空格

解决:

输入空格
点击完全匹配
替换所有空格

最后

alt+shift+f格式化json

  1. {
  2. "supportType": "202",
  3. "prjRegion": "福建省福州市",
  4. "enterpriseInfoAddressDTOList": [
  5. {
  6. "addressee": "liu",
  7. "contactNumber": "15859302136",
  8. "detailAddress": "福建省福州市鼓楼区wwwwww"
  9. }
  10. ],
  11. "holderEntAddress": "北京",
  12. "holderEntLicenseDoc": "http://124.71.179.222:8081/apiapp/sys/attachment/fileShow.do?attachBatchId=436425003387711488&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489",
  13. "openingBank": "11",
  14. "prjPlan": 33,
  15. "holderEntQuaDocList": [],
  16. "supperPrjCode": "",
  17. "bidContract": 50000,
  18. "holderIdno": "352228191237126316",
  19. "holderLinkmanIdno": "352229198803180538",
  20. "tendererProjectCode": "",
  21. "holderName": "呜呜呜呜",
  22. "holderEmail": "450969904@qq.com",
  23. "holderLegalIdno": "352229198803180538",
  24. "holderLegalIdcardDocFront": "http://124.71.179.222:8081/apiapp/sys/attachment/file.do?attachId=426960&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489",
  25. "openingBankAccount": "3333333",
  26. "holderLinkmanMobile": "15859302136",
  27. "guaranteeEnterpriseIdentity": "",
  28. "bond": 50000.0,
  29. "productCode": "ttttt555555",
  30. "supperPrjName": "非投标保函",
  31. "holderLinkmanName": "刘泽华",
  32. "holderMobile": "11",
  33. "insureNo": "446822356615557120",
  34. "holderEntType": 1,
  35. "holderLegal": "刘泽华",
  36. "holderLegalIdcardDocBack": "http://124.71.179.222:8081/apiapp/sys/attachment/file.do?attachId=426961&ACCESS_TOKEN=72a41f4a-80db-4386-b2f0-a91283596489",
  37. "tradeCenter": "330822"
  38. }