Coder Social home page Coder Social logo

kaige / jsontoolsnppplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from molsonkiko/jsontoolsnppplugin

0.0 0.0 0.0 32.2 MB

modify the JsonTools NotePad++ Plugin according to my needs

License: Apache License 2.0

Python 0.91% C# 98.57% PowerShell 0.09% Batchfile 0.14% Jupyter Notebook 0.29%

jsontoolsnppplugin's Introduction

JsonToolsNppPlugin

Continuous Integration

Miscellaneous tools for working with JSON in Notepad++.

If you have any issues, see if updating to the latest release helps, and then feel free to raise an issue on GitHub. Please be sure to include diagnostic information about your system and plugin version.

Features

  1. Pretty-print JSON so that it's spread out over multiple lines.
  2. Compress JSON so that it has little or no unnecessary whitespace.
  3. Open a drop-down tree view of the document. Selecting a node in the tree navigates to the corresponding line in the document.
  4. Able to parse documents that have many different syntax errors, including but not limited to:
  5. Get the path to the current line
  6. Query and edit JSON with:
  7. Parse JSON Lines documents.
  8. A form for gettting JSON from APIs or many different local files.
  9. JSON schema validation, including automatic validation based on filenames.
  10. Generation of random JSON
  11. Generation of JSON schema from JSON
  12. Automatic error checking after editing
  13. Select all JSON in a non-JSON file
  14. Quickly convert between JSON strings and raw text

Read the docs.

View past changes.

JSON file with syntax errors before and after use of JSON tools

Downloads and Installation

Go to the Releases page to see past releases.

Download latest 32-bit version

You can unzip the 32-bit download to .\Program Files (x86)\Notepad++\plugins\JsonTools\JsonTools.dll.

Download latest 64-bit version

You can unzip the 64-bit download to C:\Program Files\Notepad++\plugins\JsonTools\JsonTools.dll.

Alternatively, you can follow these installation instructions to install the latest version of the plugin from Notepad++.

System Requirements

Every version of the plugin works on Notepad++ 8.4.1 onward.

Versions of the plugin from 4.10.0.3 onward are compatible with older Notepad++ (tested for 7.3.3, may be compatible with even older).

Every version up to and including 3.7.2.1 should work natively on Windows 8 or later (note: this is untested), or you must install .NET Framework 4.0. Every version beginning with 4.0.0 works on Windows 10 May 2019 update or later, or you must install .NET Framework 4.8.

Alternative tools

Notepad++

This plugin may consume huge amounts of memory when working with really huge JSON files (say 50+ megabytes). As of version 0.3.0, my HugeFiles plugin can break a JSON file up into chunks such that every chunk is syntactically valid JSON. This way you don't need to read the entire file into the text editor, and you can look at one chunk at a time. You can also use this plugin to perform simple find/replace operations on the entire file (maybe eventually allowing control over which sections of the file to edit). Finally, the plugin allows a very large JSON file to be broken up into separate syntactically valid JSON files, which may be easier to use.

JSMinNPP is a reasonable alternative, although v5.0.0 of JsonTools has comparable performance and parsing ability.

While not a JSON plugin per se, PythonScript enables Notepad++ users to customize the editor with Python scripts. Since Python has an excellent native JSON library, you could easily use this plugin to create custom scripts for working with JSON.

Because Python has good 3rd-party packages for working with YAML and TOML (two good alternatives to JSON), PythonScript could potentially be used to allow this package to work with YAML and TOML.

VSCode

Visual Studio Code has native support for JSON with comments. Just go down to where the language is listed in the right side of the taskbar, and select JSON with Comments from the drop-down menu that appears at the top of the screen.

VSCode also has a built-in JSON tree viewer and some support for searching for keys and indices in JSON.

VSCode has many useful tools for working with JSON Schema. VSCode's JSON Schema validation is much more robust than what this plugin currently offers. You can also configure the editor to automatically use a certain JSON schema to validate JSON with a certain file path. For example, you could configure the editor to always parse files with names like *tweet*.json with the schema tweet_schema.json. Note: as of version 4.11, a similar feature exists in this plugin.

The JSON Tools plugin provides the same pretty-print and minify functionalities as this plugin.

Finally, the Encode/Decode plugin allows fast interconversion of YAML and JSON, among other things.

Emacs

Consult this list. One Emacs plugin, JSON mode, inspired the Path to current line feature of this plugin.

Python

Python's standard library JSON module is excellent, albeit limited to syntactically correct JSON according to the original JSON standard.

Python's package ecosystem is incredibly rich, so I can't possibly list all the useful tools here. Three that I've enjoyed working with are:

  1. Pandas. The Python tool for working with pretty much any kind of data. 'Nuff said.
  2. GenSON. A really user-friendly tool for JSON schema generation. Includes a CLI tool for JSON schema generation and a programmatic API. Has some tools for, e.g., merging two schemas, but I haven't used those tools as much.
  3. DeepDiff. This is super cool! It allows fast (and I mean REALLY FAST) comparison of two JSON documents to find how they differ. For instance, DeepDiff would correctly show that
{"a": [1, 2, {"b": [3, 4]}]}

and

{"a": [1, 2, {"b": [4, 4]}]}

differ in that the first element of root['a'][2]['b'] was changed from 3 to 4.

Websites

This website offers (limited) JSON->CSV conversion, pretty-printing (appears to use the same algorithm as me), minifying, JSON->XML conversion, and a pretty good tree viewer.

I expect you could find plenty of other good websites if you did some research.

Acknowledgments

jsontoolsnppplugin's People

Contributors

molsonkiko avatar kbilsted avatar mahee96 avatar fruchtzwerg94 avatar dail8859 avatar alex-ilin avatar bdr76 avatar dependabot[bot] avatar kaige avatar chcg avatar annavel avatar gandarez avatar lipnitsk avatar jokedst avatar oleg-shilo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.