Reformat tool for JSON
Emacs Lisp
Latest commit 8eb6668 Oct 27, 2016 @gongo fix README
Permalink
Failed to load latest commit information.
images Update sample image Oct 28, 2014
test Add test for distinguishable `{}` and null Jul 23, 2015
.ert-runner Use ert-runner Oct 7, 2014
.gitignore add Cask Feb 26, 2014
.travis.yml 🍕 Sep 1, 2015
Cask Refactoring Sep 30, 2015
README.md fix README Oct 27, 2016
json-reformat.el Mark custom variables as safe for local variables Feb 11, 2016

README.md

JSON Reformat

Build Status Coverage Status melpa badge melpa stable badge

json-reformat.el is reformat tool for JSON.

Important

From emacs 24.4 , json-pretty-print and json-pretty-print-buffer (similar specifications as json-reformat-region) was bundled.

Requirements

  • Emacs 23 or higher

Installation

You can install from MELPA with package.el

M-x package-install RET json-reformat

Usage

M-x json-reformat-region

Sample 1

Sample 2

Configuration

json-reformat:indent-width (integer)

    Change indentation level (default 4)

json-reformat:pretty-string? (boolean)

    Specify whether to decode the string (default nil)

    Example:

    ;; {"name":"foo\"bar","nick":"foo \u00e4 bar","description":"<pre>\nbaz\n</pre>","home":"/home/foobar"}

    If nil:

    {
        "name": "foo\"bar",
        "nick": "foo \u00e4 bar",
        "description": "<pre>\nbaz\n<\/pre>",
        "home": "\/home\/foobar"
    }

    Else t:

    {
        "name": "foo\"bar",
        "nick": "foo ä bar",
        "description": "<pre>
    baz
    </pre>",
        "home": "/home/foobar"
    }

LICENSE

MIT License. see json-reformat.el