• Login
Community
  • Login

JSON file

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 1.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Eran Blecher
    last edited by Dec 1, 2019, 11:44 PM

    Can I open .json file in npp?

    A 1 Reply Last reply Dec 2, 2019, 5:58 AM Reply Quote 0
    • P
      PeterJones
      last edited by PeterJones Dec 2, 2019, 12:26 AM Dec 2, 2019, 12:25 AM

      Yes. JSON is a plaintext data structure file, so you should be able to even read and edit what’s there.

      Was there really more to your question than that? Were you curious about syntax highlighting, or file association, or something else?

      1 Reply Last reply Reply Quote 2
      • P
        PeterJones
        last edited by Dec 2, 2019, 1:02 AM

        Sorry, I was on my phone at the time, so couldn’t check things in Notepad++.

        • syntax highlighting: if you open a file with the extension .json, Notepad++ will automatically apply JSON syntax highlighting to the text, so you can see the structure (for example, { : }) vs the strings ("label" or "data"). However, the builtin lexer doesn’t distinguish between left-side and right-side, so "label": "data" will use the same highlighting for both strings. If you want more complicated differentiation of the syntax highlighting, you might be able to use an enhanceanylexer.py pythonscript (sorry, my link is my scratchpad on another computer; search the forum for “enhanceanylexer”)

        • File association: go to Settings > Preferences > File Association, select web script, select .jsonand use the -> button to move .json to the right registered extensions. After exiting Notepad++, .json files should be properly associated with Notepad++, so you can double-click the file to open it in Notepad++)

        If your question really wanted more than that, please clarify.

        1 Reply Last reply Reply Quote 3
        • A
          andrecool-68 @Eran Blecher
          last edited by andrecool-68 Dec 2, 2019, 6:00 AM Dec 2, 2019, 5:58 AM

          @Eran-Blecher
          Notepad +++ opens any text files, and the * .json extension is a text format))
          Install the JSTool plugin for formatting * .JSON files, and it will become much more convenient to work with this format!

          Imgur

          1 Reply Last reply Reply Quote 2
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors