Separate outgoing JSON data by newlines
1 files changed, 6 insertions(+), 1 deletions(-)

M sq.scm
M sq.scm +6 -1
@@ 129,6 129,11 @@ 
      (lambda (x p)
        (writer x p)))))
 
+(: json-write* (any #!optional output-port -> undefined))
+(define (json-write* x #!optional (port (current-output-port)))
+  (json-write x port)
+  (newline port))
+
 (define (proxy input output)
   (let-values (((input* rewind) (make-rewindable-input-port input)))
     (handle-exceptions e

          
@@ 143,7 148,7 @@ 
       (signal 'scheme))))
 
 (define (proxy-scheme input output)
-  (copy-port* input output read json-write))
+  (copy-port* input output read json-write*))
 
 (define (proxy-json input output)
   (copy-port* input output json-read pretty-print))