(import (scheme base)) (define (json-rpc-dispatch j) (let* ((method-pair (assoc 'method j)) (params-pair (assoc 'params j))) (unless (and method-pair params-pair) (raise #f)) (let ((method-name (cdr method-pair))) (unless (and (not (pair? method-name)) (string? method-name)) (raise #f)))))