hanshuebner/yason — Issue #7: encode-object-elements improperly encodes lists
Author: znewman01
Created: 2011-12-06 03:19:01+00:00
State: open

The function encode-object-elements, which is supposed to encode a plist into JSON, improperly encodes lists.

For example,

CL-USER> (json:with-output (*standard-output*)
(json:with-object ()
(json:encode-object-elements '("a" 1 "b" 2 "c" 3))))
{["a",1,"b",2,"c",3]:null}
NIL

encode-object-elements has ```(&rest elements)``` as its lambda list; changing this to simply ```(elements)``` solves the problem:

CL-USER> (json:with-output (*standard-output*)
(json:with-object ()
(json:encode-object-elements '("a" 1 "b" 2 "c" 3))))
{"a":1,"b":2,"c":3}
NIL