diff --git a/elisp/chronometrist-sqlite.el b/elisp/chronometrist-sqlite.el index 2c79b6a..2b2da4f 100644 --- a/elisp/chronometrist-sqlite.el +++ b/elisp/chronometrist-sqlite.el @@ -124,19 +124,18 @@ prop-id of the inserted or existing property." (defun chronometrist-sqlite-properties-to-json (plist) "Return PLIST as a JSON string." - (let ((json-encoding-pretty-print t)) - (json-encode - ;; `json-encode' throws an error when it thinks - ;; it sees "alists" which have numbers as - ;; "keys", so we convert any cons cells and any - ;; lists starting with a number to vectors - (-tree-map (lambda (elt) - (cond ((chronometrist-pp-pair-p elt) - (vector (car elt) (cdr elt))) - ((consp elt) - (vconcat elt)) - (t elt))) - plist)))) + (json-encode + ;; `json-encode' throws an error when it thinks + ;; it sees "alists" which have numbers as + ;; "keys", so we convert any cons cells and any + ;; lists starting with a number to vectors + (-tree-map (lambda (elt) + (cond ((chronometrist-pp-pair-p elt) + (vector (car elt) (cdr elt))) + ((consp elt) + (vconcat elt)) + (t elt))) + plist))) (defcustom chronometrist-sqlite-properties-function nil "Function used to control the encoding of user key-values. diff --git a/elisp/chronometrist-sqlite.org b/elisp/chronometrist-sqlite.org index 948a7cd..da249ce 100644 --- a/elisp/chronometrist-sqlite.org +++ b/elisp/chronometrist-sqlite.org @@ -171,19 +171,18 @@ prop-id of the inserted or existing property." #+BEGIN_SRC emacs-lisp (defun chronometrist-sqlite-properties-to-json (plist) "Return PLIST as a JSON string." - (let ((json-encoding-pretty-print t)) - (json-encode - ;; `json-encode' throws an error when it thinks - ;; it sees "alists" which have numbers as - ;; "keys", so we convert any cons cells and any - ;; lists starting with a number to vectors - (-tree-map (lambda (elt) - (cond ((chronometrist-pp-pair-p elt) - (vector (car elt) (cdr elt))) - ((consp elt) - (vconcat elt)) - (t elt))) - plist)))) + (json-encode + ;; `json-encode' throws an error when it thinks + ;; it sees "alists" which have numbers as + ;; "keys", so we convert any cons cells and any + ;; lists starting with a number to vectors + (-tree-map (lambda (elt) + (cond ((chronometrist-pp-pair-p elt) + (vector (car elt) (cdr elt))) + ((consp elt) + (vconcat elt)) + (t elt))) + plist))) #+END_SRC *** properties-function :custom:variable: