Commits

Richo Healey  committed 72a7fb8

Cope with strange alists

  • Participants
  • Parent commits 793625f

Comments (0)

Files changed (1)

File lib/json.scm

   (lambda (alst)
     (string-append "{"
       (string-intersperse (map (lambda (pair)
-                                 (string-intersperse (list (elem->jsonobj (car pair)) (elem->jsonobj (cadr pair))) ":")
+                                 (string-intersperse (list
+                                                       (elem->jsonobj (car pair))
+                                                       (elem->jsonobj (if (list? (cdr pair)) (cadr pair) (cdr pair))))
+                                                     ":")
                                  ) alst) ",") "}" )))