问题描述
我需要Notepad ++从中获取一个json字符串
I need Notepad++ to take a json string from this
{"menu": {"id": "file","value": "File","popup": {"menuitem": [{"value": "New", "onclick": "CreateNewDoc()"},{"value": "Open", "onclick": "OpenDoc()"},{"value": "Close", "onclick": "CloseDoc()"}]}}}
对此...
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
我环顾了所有的TextFX选项,但找不到任何有效的方法.
I looked around at all the TextFX options but couldn't find anything that worked.
推荐答案
安装
从 http://sourceforge.net/projects/jsminnpp/下载并复制JSMinNpp. dll到记事本++的插件目录.或者,您也可以从记事本++中的插件管理器中安装"JSTool".
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++.
新安装了Notepad ++,PluginManager去了哪里?请参阅如何在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()"
}
]
}
}
}
提示:选择要重新格式化的代码,然后选择插件" JSTool | JSFormat.
Tip: Select the code you want to reformat, then Plugins | JSTool | JSFormat.
这篇关于如何在Notepad ++中重新格式化JSON?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!