patch 7.4.1666
Problem:    When reading JSON from a channel all readahead is used.
Solution:   Use the fill function to reduce overhead.
diff --git a/src/json.c b/src/json.c
index 9738fc5..b4ebe74 100644
--- a/src/json.c
+++ b/src/json.c
@@ -350,8 +350,10 @@
 	if (reader->js_fill != NULL && c == NUL)
 	{
 	    if (reader->js_fill(reader))
+	    {
 		reader->js_end = reader->js_buf + STRLEN(reader->js_buf);
-	    continue;
+		continue;
+	    }
 	}
 	if (c == NUL || c > ' ')
 	    break;