commit 176221acbe983321ddd8bd6b809c199f717e3583 from: Lukas Henkel date: Mon May 16 17:25:08 2022 UTC Small util to JSON format an object or a string interactively commit - 4a2b1b6cc96593fe80ccb13eccdd933bc41f21b4 commit + 176221acbe983321ddd8bd6b809c199f717e3583 blob - 8402a4428a78d5807d1b87b0647f17800a661e7a blob + 59aca5a5f27872b64f31f654f75eaad9bc2ed022 --- lisp/lh.el +++ lisp/lh.el @@ -101,4 +101,8 @@ (find-file (concat "/doas::" (buffer-file-name))) (kill-buffer old))) +(defun lh/insert-json-encoded (obj) + (interactive "MData: ") + (insert (json-serialize obj))) + (provide 'lh)