All Projects → ChrisPenner → jet

ChrisPenner / jet

Licence: BSD-3-Clause license
A structural editor for JSON values

Programming Languages

haskell
3896 projects

Jet - A Structural JSON editor

Jet is a structural editor for JSON.

I.e. an editor which is aware of the structure of JSON and allows you to manipulate it directly. The document is always in a valid state.

demo.mov

Features

  • Structurally sound editing, never outputs invalid JSON.
  • Copy/Cut/Paste JSON subtrees
  • Subtree folding so you can focus on what's important.
  • Transpose values around each other in lists.
  • Undo/redo system, everyone makes mistakes
  • Save functionality

Keymaps

Press ? to see the key map, which should feel familiar to vim users.

Installation

cabal update && cabal install jet

Usage

# Open a file for editing. Use ctrl-s to save back to the file.
# The edited file is output to stdout even if unsaved.
jet myfile.json 

# Using jet in a pipeline for quick in-line edits.
cat myfile.json | jet > result.json

Roadmap/Known bugs

  • Figure out why vty needs two keystrokes to quit for some reason.
  • Allow cut/paste of keys of objects.
  • Allow inserting when empty key already exists
  • Add search
  • Improved visibility around copy/paste with highlighting
  • Increment/decrement commands for integers.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].