diff options
-rw-r--r-- | aws/cloudformation/utils/json.scm | 7 | ||||
-rw-r--r-- | split-spec.scm | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/aws/cloudformation/utils/json.scm b/aws/cloudformation/utils/json.scm index 11ca6bf..1b30e51 100644 --- a/aws/cloudformation/utils/json.scm +++ b/aws/cloudformation/utils/json.scm @@ -19,12 +19,7 @@ (define-module (aws cloudformation utils json) #:use-module (ice-9 match) - #:export (read-json json-assoc-ref write-json)) - -(define (json-assoc-ref json key) - (match (assoc-ref json key) - (('@ . alist) alist) - (x x))) + #:export (read-json write-json)) (define (json-error port) (throw 'json-error port)) diff --git a/split-spec.scm b/split-spec.scm index cf45581..6396d1f 100644 --- a/split-spec.scm +++ b/split-spec.scm @@ -22,7 +22,7 @@ (define spec (call-with-input-file "cloudformation-spec.json" read-json)) -(define spec-version (json-assoc-ref spec "ResourceSpecificationVersion")) +(define spec-version (assoc-ref spec "ResourceSpecificationVersion")) (define properties-by-service (make-hash-table)) (define resources-by-service (make-hash-table)) @@ -42,10 +42,10 @@ (for-each (lambda (property) (add-to-group properties-by-service property)) - (json-assoc-ref spec "PropertyTypes")) + (assoc-ref spec "PropertyTypes")) (for-each (lambda (property) (add-to-group resources-by-service property)) - (json-assoc-ref spec "ResourceTypes")) + (assoc-ref spec "ResourceTypes")) (define (hash-table-keys table) (hash-fold (lambda (k v memo) (cons k memo)) '() table)) |