From 7e6172366379df68b324753617f5d6f69e1691f2 Mon Sep 17 00:00:00 2001 From: Wataru MIYAGUNI Date: Thu, 11 Dec 2014 09:51:46 +0900 Subject: [PATCH] Add description about json-reformat:pretty-string? --- README.md | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 98568c9..e3ace6f 100644 --- a/README.md +++ b/README.md @@ -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":"
\nbaz\n
"} -``` + ;; {"name":"foo\"bar","nick":"foo \u00e4 bar","description":"
\nbaz\n
"} -Result of `json-pretty-print`: + If nil: -```json -{ - "description": "
\nbaz\n<\/pre>",
-  "nick": "foo \u00e4 bar",
-  "name": "foobar"
-}
-```
+    {
+        "name": "foo\"bar",
+        "nick": "foo \u00e4 bar",
+        "description": "
\nbaz\n<\/pre>"
+    }
 
-Result of `json-reformat-region`:
+    Else t:
 
-```json
-{
-  "description": "
-baz
-
", - "nick": "foo ä bar", - "name": "foobar" -} + { + "name": "foo\"bar", + "nick": "foo ä bar", + "description": "
+    baz
+    
" + } ``` +## 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`