DamienCassou / json-navigator

View and navigate JSON structures
GNU General Public License v3.0
149 stars 7 forks source link

** Summary

Display any JSON document as a tree by typing ~M-x json-navigator-navigator~. Here is a screencast showing the navigation tree of an [[file:examples/example.json][example JSON document]].

[[file:media/json-tree-anime.gif]]

This project is made possible thanks to the [[https://github.com/DamienCassou/hierarchy][hierarchy]] project.

** Installing

Use [[http://melpa.org/][melpa]].

** Using

Move point before a JSON document and type ~M-x json-navigator-navigate-after-point~, alternatively select a JSON region and invoke ~M-x json-navigator-navigate-region~. This will open a new buffer where you can navigate the JSON hierarchy.

The available keybindings in the ~hierarchy tree~ buffer are the standard Emacs tree widget ones, ~Tab~ and ~shift-Tab~ will move on the tree, and ~Enter~ will expand/collapse nodes. The mouse can also be used to expand/collapse nodes by clicking on them.

[[https://www.emacswiki.org/emacs/TreeMode][Tree mode]], if installed, can be activated in the JSON navigator ~hierarchy-tree~ buffer to allow for additional functionality like expanding whole subtrees, navigating to siblings and so on.

** Contributing

Yes, please do! See [[file:CONTRIBUTING.md][CONTRIBUTING]] for guidelines.

** License

See [[file:COPYING][COPYING]]. Copyright (c) 2017-2023 [[mailto:damien@cassou.me][Damien Cassou]].