Skip to content

Commit

Permalink
Add description about json-reformat:pretty-string?
Browse files Browse the repository at this point in the history
  • Loading branch information
gongo committed Dec 11, 2014
1 parent 973366f commit 7e61723
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,38 @@ M-x json-reformat-region
json-reformat:indent-width (integer)
Change indentation level (default 4)
```
## IMPORTANT
json-reformat:pretty-string? (boolean)
From emacs 24.4, `json-pretty-print` and `json-pretty-print-buffer` was bundled.
Specify whether to decode the string (default nil)
Example:
Example:
```json
{"name":"foobar","nick":"foo \u00e4 bar","description":"<pre>\nbaz\n</pre>"}
```
;; {"name":"foo\"bar","nick":"foo \u00e4 bar","description":"<pre>\nbaz\n</pre>"}
Result of `json-pretty-print`:
If nil:
```json
{
"description": "<pre>\nbaz\n<\/pre>",
"nick": "foo \u00e4 bar",
"name": "foobar"
}
```
{
"name": "foo\"bar",
"nick": "foo \u00e4 bar",
"description": "<pre>\nbaz\n<\/pre>"
}
Result of `json-reformat-region`:
Else t:
```json
{
"description": "<pre>
baz
</pre>",
"nick": "foo ä bar",
"name": "foobar"
}
{
"name": "foo\"bar",
"nick": "foo ä bar",
"description": "<pre>
baz
</pre>"
}
```

## SEE ALSO

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

## LICENSE

MIT License. see `json-reformat.el`
Expand Down

0 comments on commit 7e61723

Please sign in to comment.