Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I need Notepad++ to take a json string from this (我需要Notepad ++从中获取一个json字符串)

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

to this... (对...)

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

I looked around at all the TextFX options but couldn't find anything that worked. (我环顾了所有TextFX选项,但找不到任何有用的东西。)

  ask by Donny V. translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
561 views
Welcome To Ask or Share your Answers For Others

1 Answer

Update: (更新:)

As of Notepad++ v7.6, use Plugin Admin to install JSTool per this answer (从Notepad ++ v7.6开始,使用插件管理员根据此答案安装JSTool)

INSTALL (安装)

Download it from http://sourceforge.net/projects/jsminnpp/ and copy JSMinNpp.dll to plugin directory of Notepad++. (从http://sourceforge.net/projects/jsminnpp/下载并将JSMinNpp.dll复制到Notepad ++的插件目录。) Or you can just install "JSTool" from Plugin Manager in Notepad++. (或者您可以在Notepad ++中从插件管理器安装“JSTool”。)

New Notepad++ install and where did PluginManager go? (新的Notepad ++安装和PluginManager去了哪里?) See How to view Plugin Manager in Notepad++ (请参阅如何在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 | (JSTool |) JSFormat. (JSFormat。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...