patch 7.4.1231
Problem:    JSON messages are not parsed properly.
Solution:   Queue received messages.
diff --git a/src/json.c b/src/json.c
index a561042..9c78e15 100644
--- a/src/json.c
+++ b/src/json.c
@@ -549,14 +549,16 @@
 
 /*
  * Decode the JSON from "reader" and store the result in "res".
+ * Return OK or FAIL;
  */
-    void
+    int
 json_decode(js_read_T *reader, typval_T *res)
 {
     json_skip_white(reader);
     json_decode_item(reader, res);
     json_skip_white(reader);
     if (reader->js_buf[reader->js_used] != NUL)
-	EMSG(_(e_invarg));
+	return FAIL;
+    return OK;
 }
 #endif