branch: externals/tomelr commit 732140041e91528a7ee3c730ce10bac0931698c4 Author: Kaushal Modi <kaushal.m...@gmail.com> Commit: Kaushal Modi <kaushal.m...@gmail.com>
doc: Discover `json-encoding-pretty-print` variable! --- README.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.org b/README.org index 6c0e0711e8..3db9373425 100644 --- a/README.org +++ b/README.org @@ -899,7 +899,7 @@ the name matches "scalar" completely or partially, run: #+begin_src shell make test MATCH=scalar #+end_src -* Helper function +* COMMENT Helper function ** JSON Reference pretty print string The ~json-encode-pretty~ function defined here is used to pretty-print the above JSON examples. @@ -908,10 +908,9 @@ the above JSON examples. (defun json-encode-pretty (object) "Return prettified JSONified version of OBJECT." (with-temp-buffer - (let ((json-false :false)) - (insert (json-encode object)) - (json-pretty-print-buffer) - (buffer-substring-no-properties (point-min) (point-max))))) + (let ((json-false :false) + (json-encoding-pretty-print t)) + (json-encode object)))) #+end_src * Reference [[https://toml.io/en/v1.0.0/][TOML v1.0.0 Spec]]