Thu Aug 28 23:23:19 CDT 2008  Stephen Compall <scompall@nocandysw.com>
  * Explicitly test for alist instead of type error

New patches:

[Explicitly test for alist instead of type error
Stephen Compall <scompall@nocandysw.com>**20080829042319] {
hunk ./src/encoder.lisp 26
-  (handler-case 
-      (write-string (with-output-to-string (temp)
-                      (call-next-method s temp))
-                    stream)
-    (type-error (e)
-      (declare (ignore e))
-      (encode-json-alist s stream))))
+  (if (assocp s)
+      (encode-json-alist s stream)
+      (call-next-method)))
hunk ./src/utils.lisp 11
+(defun assocp (list)
+  "Answer whether LIST is an association list."
+  (or (null list)
+      (loop with found-assoc = nil
+	 for head = list then (cdr head)
+	 while (consp head)
+	 always (consp (car head))
+	 do (and (not found-assoc)
+		 (not (listp (cdar head))) (setf found-assoc t))
+	 finally (return found-assoc))))
+
}

Context:

[Added with-clos-decoder-semantics.
boris.smilga@gmail.com**20080707140716] 
[Fixed MAKE-OBJECT-PROTOTYPE (T) so that MAX-PACKAGE ignores STANDARD-OBJECT superclass.
boris.smilga@gmail.com**20071231153300
 When constructing an anonymous class, an empty list of superclasses is
 defaulted to '(STANDARD-OBJECT).  Now if we have all slot names in the
 package KEYWORD the correct behaviour would be to return that package,
 but STANDARD-OBJECT is not in KEYWORD.  (Another bug in
 MAKE-OBJECT-PROTOTYPE (T) led to the deduced maximum package being
 COMMON-LISP, and even if we fixed that, we'd have MAX-PACKAGE issuing
 warnings.)  The solution is to have STANDARD-OBJECT removed from the
 list of superclasses before it is passed to MAX-PACKAGE.
] 
[Fixed handling of package which resulted in test failure.
boris.smilga@gmail.com**20071231145109
 The program failed TEST*JSON-SYMBOLS-PACKAGE*.  That was due to the
 manner of operation of WITH-OLD-DECODER-SEMANTICS which worked
 essentially by supplying a canonical prototype, so that the decoder
 has a preconception of what kind of object to create--and where to
 intern names.  The last part was clearly wrong: there should be no
 such preconception, as the user might be setting *JSON-SYMBOLS-PACKAGE*
 (outside WITH-OLD-DECODER-SEMANTICS) to a non-default value, and it is
 this value rather than the one supplied in the prototype that should
 be obeyed.
] 
[encode as p-list (by Hans Hübner)
Henrik Hjelte <henrik@evahjelte.com>**20080318233313] 
[get rid of some newly introduced compiler warnings
Henrik Hjelte <henrik@evahjelte.com>**20080120091410] 
[todo file
Henrik Hjelte <henrik@evahjelte.com>**20080114144149] 
[restore list-decoder defaults 
Henrik Hjelte <henrik@evahjelte.com>**20080105100011
 for backwards compatibility, some
 of my old code broke with the new default
 variable values
] 
[Updated some testcases to work with arrays as well as lists
Henrik Hjelte <henrik@evahjelte.com>**20071228170926] 
[changed name of with-old-decoder-semantics to with-list-decoder-semantics
Henrik Hjelte <henrik@evahjelte.com>**20071228170803] 
[put old style semantics as default
Henrik Hjelte <henrik@evahjelte.com>**20071228152325
 until the clos objects are integrated,
 have testcases, all tests run ok.
] 
[move around some stuff, made testcases work for old semantics
Henrik Hjelte <henrik@evahjelte.com>**20071228150818
 if you call set-list-decoder-semantics before (5am:run 'json)
 the 101 old testcases work ok.
] 
[renamed some parameters like constants
Henrik Hjelte <henrik@evahjelte.com>**20071228145823] 
[Added encoding of CLOS objects, and prototypes for alists and hash tables.
boris.smilga@gmail.com**20071223151744] 
[Added WITH-OLD-DECODER-SEMANTICS.
boris.smilga@gmail.com**20071223151705] 
[Added decoding of arrays to vectors or lists.
boris.smilga@gmail.com**20071223151610] 
[Added decoding of objects to CLOS objects, hash tables or alists.
boris.smilga@gmail.com**20071223151334] 
[Added CLOS / MOP infrastructure.
boris.smilga@gmail.com**20071223151000] 
[TAG 0.3.2
henrik@evahjelte.com**20071228151244] 
[json-rpc-error-object as in working draft fro json-rpc spec 1.1 
Henrik Hjelte <henrik@evahjelte.com>**20070531150713] 
[restart functions for json-rpc
Henrik Hjelte <henrik@evahjelte.com>**20070531134607] 
[documented parenscript dependency
Henrik Hjelte <henrik@evahjelte.com>**20070325211904] 
[TAG 0.3.1
Henrik Hjelte <henrik@evahjelte.com>**20070324142014] 
[version 0.3.1
Henrik Hjelte <henrik@evahjelte.com>**20070324141935] 
[test for json-symbols-package
Henrik Hjelte <henrik@evahjelte.com>**20070324141640] 
[documentation updated
Henrik Hjelte <henrik@evahjelte.com>**20070324122807] 
[variable json-symbols-package allows other packages besides keyword for interning json symbols
Henrik Hjelte <henrik@evahjelte.com>**20070324115951] 
[TAG 0.3.0
henrik@evahjelte.com**20070324141654] 
[encode-json now tries dotted-list if normal list fails
Henrik Hjelte <henrik@evahjelte.com>**20070324110354] 
[Failing alist test by Nathan Hawkins
Henrik Hjelte <henrik@evahjelte.com>**20070324102326] 
[json.test renamed cl-json.test
Henrik Hjelte <henrik@evahjelte.com>**20070324095848] 
[json.asd renamed cl-json.asd, asdf cleanup by Pascal Bourguignon
Henrik Hjelte <henrik@evahjelte.com>**20070324093357] 
[simplify test that failed for the wrong reason
Henrik Hjelte <henrik@evahjelte.com>**20061229101922] 
[show failures better
Henrik Hjelte <henrik@evahjelte.com>**20061229101832] 
[serious-condition instead of reader-error to trap number overflow
Henrik Hjelte <henrik@evahjelte.com>**20061229101705
 SBCL signals reader-error, Allegro signals error. 
 Serious-condition ought to work on all Lisp implementations
] 
[encode characters as strings, patch by Ken Harris
Henrik Hjelte <henrik@evahjelte.com>**20061229094512] 
[configurable to allow non-strict json (suggestion by Ben Hyde)
Henrik Hjelte <henrik@evahjelte.com>**20061031054156
 set *use-strict-json-rules* to nil if you want to be 
 generous in what json you accept..
] 
[restarts in json-rpc
Henrik Hjelte <henrik@evahjelte.com>**20060926135223] 
[bugfix to last json-bind change
henrik@evahjelte.com**20060924093311] 
[json-bind can take alist as well as string
henrik@evahjelte.com**20060923171022] 
[smarter json-bind allows access to nested objects with dot-notation
henrik@evahjelte.com**20060923103021] 
[decoding symbols in camelCase becomes camel-case just as in parenscript.
henrik@evahjelte.com**20060923091853] 
[interning of strings moved to a single function json-intern
henrik@evahjelte.com**20060923090745] 
[symbols encoded by parenscript, 'camel-case becomes "camelCase"
henrik@evahjelte.com**20060922142711] 
[remove separate asdf module for json-rpc
henrik@evahjelte.com**20060922142524] 
[json-rpc
henrik@evahjelte.com**20060818161526] 
[keyword package for keys when decoding objects
henrik@evahjelte.com**20060223090421] 
[bugfix encoding hashtables
henrik@evahjelte.com**20060222215326] 
[links refer to json.org
henrik@evahjelte.com**20060218114508] 
[ No form-character on openmcl
henrik@evahjelte.com**20060205170525] 
[MIT license
henrik@evahjelte.com**20060205110905] 
[testjson
henrik@evahjelte.com**20060203211337] 
[html
henrik@evahjelte.com**20060203193308] 
[encoder works
henrik@evahjele.com**20060202142849] 
[First version, decoder
henrik@evahjele.com**20060130172648] 
Patch bundle hash:
cc0d49bbbfa91f957f75ec06af836925ed0e7029
