https://github.com/gongo/json-reformat
Reformat tool for JSON
https://github.com/gongo/json-reformat
Last synced: about 1 year ago
JSON representation
Reformat tool for JSON
- Host: GitHub
- URL: https://github.com/gongo/json-reformat
- Owner: gongo
- Created: 2014-02-26T15:13:14.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T00:44:43.000Z (over 3 years ago)
- Last Synced: 2024-05-02T06:06:59.897Z (almost 2 years ago)
- Language: Emacs Lisp
- Size: 209 KB
- Stars: 172
- Watchers: 6
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-json - JSON Reformat - Reformat tool. (Text Editor Plugins)
README
JSON Reformat
=============
[](https://travis-ci.org/gongo/json-reformat)

[](https://coveralls.io/r/gongo/json-reformat?branch=master)
[![melpa badge][melpa-badge]][melpa-link]
[![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
`json-reformat.el` is reformat tool for [JSON](http://en.wikipedia.org/wiki/JavaScript_Object_Notation).
## 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](http://melpa.milkbox.net/) with package.el
M-x package-install RET json-reformat
## Usage
```
M-x json-reformat-region
```
### Sample 1

### Sample 2


## Configuration
```lisp
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":"
\nbaz\n
","home":"/home/foobar"}
If nil:
{
"name": "foo\"bar",
"nick": "foo \u00e4 bar",
"description": "
\nbaz\n<\/pre>",
"home": "\/home\/foobar"
}
Else t:
{
"name": "foo\"bar",
"nick": "foo ä bar",
"description": "
baz
",
"home": "/home/foobar"
}
```
## LICENSE
MIT License. see `json-reformat.el`
[melpa-link]: http://melpa.org/#/json-reformat
[melpa-stable-link]: http://stable.melpa.org/#/json-reformat
[melpa-badge]: http://melpa.org/packages/json-reformat-badge.svg
[melpa-stable-badge]: http://stable.melpa.org/packages/json-reformat-badge.svg