Community
    • Login

    JSON file

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 3 Posters 1.5k 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.
    • Eran BlecherE
      Eran Blecher
      last edited by

      Can I open .json file in npp?

      andrecool-68A 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        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
        • PeterJonesP
          PeterJones
          last edited by

          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
          • andrecool-68A
            andrecool-68 @Eran Blecher
            last edited by andrecool-68

            @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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors