[clouchdb-cvs] CVS clouchdb/src

peddy peddy at common-lisp.net
Fri Sep 10 23:38:38 UTC 2010


Update of /project/clouchdb/cvsroot/clouchdb/src
In directory cl-net:/tmp/cvs-serv4069

Modified Files:
	decoder.lisp 
Log Message:
Added initial implementation of (changes), check for empty string in decoder


--- /project/clouchdb/cvsroot/clouchdb/src/decoder.lisp	2008/01/07 01:21:24	1.2
+++ /project/clouchdb/cvsroot/clouchdb/src/decoder.lisp	2010/09/10 23:38:38	1.3
@@ -71,8 +71,10 @@
     (car (rassoc lisp-char *json-lisp-escaped-chars*)))
 
 (defun json-to-document (json-string)
-  (with-input-from-string (stream json-string)
-    (decode-json stream)))
+  (if (> (length json-string) 0)
+      (with-input-from-string (stream json-string)
+        (decode-json stream))
+      nil))
 
 (defun decode-json (&optional (stream *standard-input*))
   "Reads a json element from stream"





More information about the clouchdb-cvs mailing list