Check-in [7164164ed6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:use @ in json
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:7164164ed67bb936dcb68596599a98e41ef5e4b3
User & Date: root 2018-04-16 15:07:54
Context
2018-04-16
15:07
use @ in json Leaf check-in: 7164164ed6 user: root tags: trunk
15:02
small fixes check-in: bd1b679435 user: aldo tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to json.sls.

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
				       (if v (cdr v) v))))#'(tag ...))
	    body ...)])))


 (define (json->string json)
   (define special '((#\backspace . #\b) (#\newline . #\n) (#\alarm . #\a) 
		     (#\return . #\r) (#\tab #\t) (#\\ . #\\) (#\" . #\")))
   (cond [(and (pair? json)  (eq? (car json) '@))
	  (string-append 
	   "{\n"
	   (string-intersperse
	    (map (lambda (pair)
		   (let ([k (car pair)]
			 [v (cdr pair)])
		     (string-append "  " (json->string k)







|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
				       (if v (cdr v) v))))#'(tag ...))
	    body ...)])))


 (define (json->string json)
   (define special '((#\backspace . #\b) (#\newline . #\n) (#\alarm . #\a) 
		     (#\return . #\r) (#\tab #\t) (#\\ . #\\) (#\" . #\")))
   (cond [(and (pair? json) (eq? (car json) '@))
	  (string-append 
	   "{\n"
	   (string-intersperse
	    (map (lambda (pair)
		   (let ([k (car pair)]
			 [v (cdr pair)])
		     (string-append "  " (json->string k)