Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions json.sc
Original file line number Diff line number Diff line change
Expand Up @@ -89,38 +89,38 @@
(l s bgn (+ 1 end) rst len quts? lst))
(else
(case (string-ref s end)
(#\{
((#\{)
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end) "((" ) rst) len quts? (cons #t lst)))
(#\}
((#\})
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end) "))") rst) len quts? (loose-cdr lst)))
(#\[
((#\[)
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end) "#(") rst) len quts? (cons #f lst)))
(#\]
((#\])
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end) ")") rst) len quts? (loose-cdr lst)))
(#\:
((#\:)
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end) " . ") rst) len quts? lst))
(#\,
((#\,)
(l s (+ 1 end) (+ 1 end)
(cons
(string-append
(substring s bgn end)
(if (loose-car lst) ")(" " ")) rst) len quts? lst))
(#\"
((#\")
(l s bgn (+ 1 end) rst len (not quts?) lst))
(else
(l s bgn (+ 1 end) rst len quts? lst))))))))))
Expand Down