Convert the current region in emacs from JSON to EDN using Bork's Jet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Uses https://github.com/borkdude/jet | |
;; On OSX, install jet with: | |
;; brew install borkdude/brew/jet | |
;; I invoke this with M-x, you might want to bind it to a key | |
(defun json->edn () | |
(interactive) | |
(shell-command-on-region (region-beginning) | |
(region-end) | |
"jet --pretty --keywordize keyword --from json --to edn" | |
(current-buffer) | |
t)) |
How can I install this function in my emacs?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tweaked it a bit into the following: