diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-11-30 12:17:11 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-11-30 12:17:29 -0500 |
commit | 9af29b8d14a218c9ee583a69f7b44a0e46e22c13 (patch) | |
tree | 8e5ee73703f05e0adecca75929035a1d602a0911 | |
parent | eea9dd7be5a5e2d79e2d42d15da5125e66946969 (diff) |
Remove json-assoc-ref procedure.
-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)) |