summaryrefslogtreecommitdiffhomepage
path: root/net/signel.org
diff options
context:
space:
mode:
Diffstat (limited to 'net/signel.org')
-rw-r--r--net/signel.org12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/signel.org b/net/signel.org
index 89c9b16..799a975 100644
--- a/net/signel.org
+++ b/net/signel.org
@@ -172,12 +172,12 @@ envelopes:
#+begin_src emacs-lisp
(defun signel--msg-contents (str)
- (cdr (assoc 'envelope (ignore-error 'json-parse-error
- (json-parse-string str
- :null-object nil
- :false-object nil
- :object-type 'alist
- :array-type 'list)))))
+ (alist-get 'envelope
+ (ignore-errors (json-parse-string str
+ :null-object nil
+ :false-object nil
+ :object-type 'alist
+ :array-type 'list))))
#+end_src
Here i am being old-school and opting to receive JSON dicitionaries as