summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-01-13 02:45:12 +0000
committerjao <jao@gnu.org>2021-01-13 02:45:12 +0000
commit9ad78f2f401cf50cc3150e7e777283b9d17cf56f (patch)
tree85471c83cbf25cbca4c07712d2e6628d74245f56
parent0ff0270717b428de630b5dd6819ea2e3dbab3d95 (diff)
downloadelibs-9ad78f2f401cf50cc3150e7e777283b9d17cf56f.tar.gz
elibs-9ad78f2f401cf50cc3150e7e777283b9d17cf56f.tar.bz2
espotify: decoding api responses using utf-8
-rw-r--r--media/espotify.org5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/espotify.org b/media/espotify.org
index 6f001fd..99168a8 100644
--- a/media/espotify.org
+++ b/media/espotify.org
@@ -124,7 +124,10 @@ Let's start with an umbrella customization group:
(goto-char url-http-end-of-headers)
(funcall callback
(let ((json-array-type 'list))
- (json-read)))))))
+ (thread-first
+ (buffer-substring (point) (point-max))
+ (decode-coding-string 'utf-8)
+ (json-read-from-string))))))))
#+end_src
So we can combine this macro with ~espotify--with-auth-token~ in a