Skip to content

Commit 7dfe61b

Browse files
committed
Support nested objects in json-read
Parses { "outer": { "inner": 1 } } without error.
1 parent a42fa46 commit 7dfe61b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

srfi/json.scm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@
421421
(case type
422422
((json-structure)
423423
(case obj
424+
((object-open)
425+
(lambda (type obj)
426+
(read-object-maybe-key '()
427+
type
428+
obj
429+
(lambda (value)
430+
(return (cons (cons key value) out))))))
424431
((array-open)
425432
(lambda (type obj)
426433
(read-array '()

0 commit comments

Comments
 (0)