diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-11-03 13:14:32 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2022-11-03 13:14:32 -0300 |
commit | ddb4e50b2bcb700dc4fb0012d9a149f08726651f (patch) | |
tree | 886782ccd86d424915d913203c252b51d1b39bc7 | |
parent | 888e53f97c0a1ef5b714b9b7a3dc1a896b873fdb (diff) | |
download | json-ddb4e50b2bcb700dc4fb0012d9a149f08726651f.tar.gz json-ddb4e50b2bcb700dc4fb0012d9a149f08726651f.zip |
Add an interface to the json package
-rw-r--r-- | json.lisp | 6 | ||||
-rw-r--r-- | package.lisp | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -125,3 +125,9 @@ null-symbol)) (_ whitespace)) v)) + +(defun parse-string (str) + (run json-value (input:from-string str))) + +(defun parse-file (file) + (run json-value (input:from-file file))) diff --git a/package.lisp b/package.lisp index 609b6b4..d2b1e6f 100644 --- a/package.lisp +++ b/package.lisp @@ -1,2 +1,4 @@ (defpackage #:json - (:use #:cl #:parser)) + (:use #:cl #:parser) + (:export #:parse-string + #:parse-file)) |