Commit 8a5bb9d5 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

json: Work around bug for (scm->json '()).

* jupyter/json.scm <top level>: Override (@@ (json builder) json-build).
parent a1fabc65
......@@ -87,3 +87,13 @@ to its JSON representation (an alist)."
(define-json-reader json->record ctor
(field spec ...) ...)))))
(set! (@@ (json builder) json-build)
;; Work around a bug in Guile-JSON 3.1.0:
;; <https://github.com/aconchillo/guile-json/issues/47>.
(let ((real-json-build (@@ (json builder) json-build)))
(lambda (scm port . rest)
(if (eq? scm '()) ;match '() but not #nil
(display "{}" port)
(apply real-json-build scm port rest)))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment