How to reformat JSON in Notepad++?

前端 未结 21 1740
清酒与你
清酒与你 2020-12-04 04:20

I need Notepad++ to take a json string from this

{\"menu\": {\"id\": \"file\",\"value\": \"File\",\"popup\": {\"menuitem\": [{\"value\": \"New\", \"onclick\"         


        
21条回答
  •  悲哀的现实
    2020-12-04 05:11

    Update:

    As of Notepad++ v7.6, use Plugin Admin to install JSTool per this answer

    INSTALL

    Download it from http://sourceforge.net/projects/jsminnpp/ and copy JSMinNpp.dll to plugin directory of Notepad++. Or you can just install "JSTool" from Plugin Manager in Notepad++.

    New Notepad++ install and where did PluginManager go? See How to view Plugin Manager in Notepad++

    {
      "menu" : {
        "id" : "file",
        "value" : "File",
        "popup" : {
          "menuitem" : [{
          "value" : "New",
              "onclick" : "CreateNewDoc()"
            }, {
              "value" : "Open",
              "onclick" : "OpenDoc()"
            }, {
              "value" : "Close",
              "onclick" : "CloseDoc()"
            }
          ]
        }
      }
    }
    

    Tip: Select the code you want to reformat, then Plugins | JSTool | JSFormat.

提交回复
热议问题