Commits

Tim van der Linden  committed 9e200ef

Removed filter and added remove, killed predicate and included srfi-1.

  • Participants
  • Parent commits 8b7c160

Comments (0)

Files changed (3)

File json-rpc-client.scm

 	     (cond ((not (is-valid-method? method)) (server-setup-data-error "method" "can only be a string."))
 		   ((not (are-valid-params? params)) (server-setup-data-error "params" "can only be a vector or an alist."))
 		   (else
-		    (send-request (filter notnull? (list (cons 'jsonrpc version)
-							(cons 'method method)
-							(if (null? params) '()
-							    (cons 'params (build-params params)))
-							    (cons 'id "1"))) ;ID is hardcoded - can't handle more then one request at a time...or can we?
+		    (send-request (remove null? (list (cons 'jsonrpc version)
+						      (cons 'method method)
+						      (if (null? params) '()
+							  (cons 'params (build-params params)))
+						      (cons 'id "1"))) ;ID is hardcoded - can't handle more then one request at a time...or can we?
 				  output)))))))
 
-; Predicate for inverting the null? predicate
-(define (notnull? x)
-  (not (null? x)))
-
 ; Helper for building a vector or alist from the parameters if present
 (define (build-params params)    
     (if (keyword? (car params)) 

File json-rpc.meta

 ((egg "json-rpc.egg")
  (synopsis "JSON RPC client/server implementation")
  (category web)
- (needs medea)
+ (needs medea srfi-1)
  (test-depends test)
  (doc-from-wiki)
  (license "BSD")

File json-rpc.setup

 (install-extension
  'json-rpc
  '("json-rpc-client.so" "json-rpc-client.import.so")
- '((version "0.1.3")
+ '((version "0.1.4")
    (documentation "json-rpc.html")))