Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    JSON String Escape / Unescape

    Plugin Development
    3
    4
    2109
    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.
    • Gioacchino Piazzolla
      Gioacchino Piazzolla last edited by

      Hi, I sometimes use this website to escape/unescape a string containing a json.
      It is really useful for development purposes.

      Do you know if there is a plugin that does the same thing?

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @Gioacchino Piazzolla last edited by

        @Gioacchino-Piazzolla

        Please don’t open a DUPLICATE thread.

        Alan Kilborn 1 Reply Last reply Reply Quote 1
        • Alan Kilborn
          Alan Kilborn @Alan Kilborn last edited by

          Actually, the thread isn’t the duplicate thing. It’s just that you posted this same posting in another existing thread.
          Be assured that others will read that earlier posting and respond to it, as indeed we have (check the other thread).

          1 Reply Last reply Reply Quote 0
          • prahladmifour
            prahladmifour last edited by

            Hello,@Gioacchino-Piazzolla
            Please follow these steps, To JSON String Escape / Unescape
            Step 1: Download the jN plugin.
            Step 2: Place files from Zip to Plugin folder of Notepad++ in C:\Programs Files\Notepad++\plugins.
            Step 3: Save Code below as URLENDECODE.js and save it to C:\Program Files\Notepad++\plugins\jN\includes.
            Step 4: Restart Notepad++.
            Code:

            var URLDecoderEncoder = Editor.addMenu('URL-Encoding/Decoding');
            URLDecoderEncoder.addItem({
                text: 'Encode',
                cmd: function() {
                    var unencoded = Editor.currentView.text;
                    var encoded = encodeURIComponent(unencoded);
                    Editor.currentView.text = encoded;
                }
            });
            URLDecoderEncoder.addItem({
                text: 'Decode',
                cmd: function() {
                    var encoded = Editor.currentView.text;
                    var unencoded = decodeURIComponent(encoded);
                    Editor.currentView.text = unencoded;
                }
            });
            URLDecoderEncoder.addItem({
                text: 'Decode multi-pass (7x)',
                cmd: function() {
                    var encoded = Editor.currentView.text;
                    var unencoded_pass1 = decodeURIComponent(encoded);
                    var unencoded_pass2 = decodeURIComponent(unencoded_pass1);
                    var unencoded_pass3 = decodeURIComponent(unencoded_pass2);
                    var unencoded_pass4 = decodeURIComponent(unencoded_pass3);
                    var unencoded_pass5 = decodeURIComponent(unencoded_pass4);
                    var unencoded_pass6 = decodeURIComponent(unencoded_pass5);
                    var unencoded = decodeURIComponent(unencoded_pass6);
                    Editor.currentView.text = unencoded;
                }
            });
            

            I hope this information will be useful to you.
            Thank you.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors