How to reformat JSON in Notepad++?

前端 未结 21 1634
清酒与你
清酒与你 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 04:56

    It's not an NPP solution, but in a pinch, you can use this online JSON Formatter and then just paste the formatted text into NPP and then select Javascript as the language.

    0 讨论(0)
  • 2020-12-04 05:02

    JSMinNpp plugin will do this job. https://sourceforge.net/projects/jsminnpp/

    0 讨论(0)
  • 2020-12-04 05:03

    simply go to this link download the dll copy and paste the dll to the plugins folder at notepad++, \Notepad++\plugins restart the notepad++, and it should be shown in the list

    NOTE: this dll supports 64 bit notepade++

    0 讨论(0)
  • 2020-12-04 05:03

    As per the latest notepad++, updated answer. Install JSON Viewer

    Open notepad++ go to Plugins --> click Plugins Admin..

    In Plugins Admin window search for JSON Viewer and click on Install

    New after installing plugin, this is how you can view file in JSON format

    0 讨论(0)
  • 2020-12-04 05:05

    I personally use JSON Viewer since the Notepad++ plugin doesn't work any more.

    EDIT - 24th May 2012

    I advise that you download the JSMin plugin for Notepad as mentioned in the answer. This works well for me in the latest version (v6.1.2 at time of writing).

    EDIT - 7th November 2017

    As per @danday74's comment below, JSMin is now JSToolNpp. Also, please be aware that the JSON Viewer tool is on Codeplex which will likely disappear in the near future.

    Given the above, this answer is no longer relevant and you should use Dan H's answer instead. My answer is simply here for posterity.

    0 讨论(0)
  • 2020-12-04 05:05

    I know this thread is old but I recently ran into a problem with JSToolNPP not being compatible with my newly updated N++, I did find a replacement that seems to work. http://sourceforge.net/projects/nppjsonviewer/

    Use at your own risk, ofc. (standard disclaimer from me when linking anything outside the SExchange, fyi)

    0 讨论(0)
提交回复
热议问题