Welcome to the CHICKEN Scheme pasting service

quick json-to-csv code added by eggless on Wed Feb 25 22:17:21 2015

(define (json->csv in-file out-file)
  (let ((keys (with-input-from-file in-file
		(lambda ()
		  (non-nested-keys (read-json (read-line)))))))
    (with-output-to-file out-file
      (lambda ()
	(write-csv (list keys))
	(with-input-from-file in-file
	  (lambda ()
	    (do ((line (read-line) (read-line)))
		((eof-object? line))
	      (write-csv (list (alist->nested-list (read-json line) keys))))))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What type of object does `for-each' expect as second argument?
Visually impaired? Let me spell it for you (wav file) download WAV