Created
April 23, 2014 22:50
-
-
Save mohiji/11235244 to your computer and use it in GitHub Desktop.
Removes all non-important whitespace from a JSON file.
This file contains hidden or 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
(require 'st-json) | |
(defun squish-json-file (filename) | |
(let ((parsed-json (with-open-file (stream filename) | |
(st-json:read-json stream)))) | |
(with-open-file (stream (concatenate 'string filename ".squished") | |
:direction :output | |
:if-exists :supersede) | |
(st-json:write-json parsed-json stream)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment