summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/zambyte/meta/gauche.scm2
-rw-r--r--lib/zambyte/meta/guile-json.scm2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/zambyte/meta/gauche.scm b/lib/zambyte/meta/gauche.scm
index 59b82c0..51972a0 100644
--- a/lib/zambyte/meta/gauche.scm
+++ b/lib/zambyte/meta/gauche.scm
@@ -61,7 +61,7 @@
(set-cdr! (assoc (symbol->string key) json) value)
json)
((null? json)
- (error "json-object-set!: cannot set on an empty object" json))
+ (json-object (cons key value)))
((list? json)
(append! json (list (cons (symbol->string key) value))))
((json-record? json)
diff --git a/lib/zambyte/meta/guile-json.scm b/lib/zambyte/meta/guile-json.scm
index a5815ff..903182b 100644
--- a/lib/zambyte/meta/guile-json.scm
+++ b/lib/zambyte/meta/guile-json.scm
@@ -48,7 +48,7 @@
(set-cdr! (assoc (symbol->string key) json) value)
json)
((null? json)
- (error "json-object-set!: cannot set on an empty object" json))
+ (json-object (cons key value)))
((list? json)
(append! json (list (cons (symbol->string key) value))))
((json-record? json)