Wednesday, February 08, 2017

How to format a json file in Emacs with manual install

Today I needed to reformat a ginormous json file, but could not use the package-manager instructions for Emacs at fire-wall/network issues.

So I manually installed all the needed files and put this in my .emacs file:

(require 'json-snatcher) ;from
(require 'json-reformat) ;from
(require 'json-mode) ;from;

 Then to format a file, select all (c-x h) then  m-x  json-reformat-region.  Works like a charm.

Thanks to the contributors for creating these packages!