Last active
October 12, 2016 21:32
-
-
Save knorth55/03d425b9ec377d9fbe3c746fa1ebf684 to your computer and use it in GitHub Desktop.
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
(require :json-decode "package://roseus_mongo/euslisp/json/json-decode.l") | |
(defun read-file-into-string (filename) | |
(with-open-file (f filename :direction :input) | |
(let (buf (str-list nil)) | |
(while (setq buf (read-line f nil)) | |
(setq str-list (append str-list (list (format nil buf))))) | |
(reduce #'(lambda (x y) (concatenate string x y)) str-list)))) | |
(defun read-json-into-string (filename) | |
(json::parse-from-string (read-file-into-string filename))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment