https://github.com/zoowii/clj-jsonrpc
A simple JSON-RPC 2.0 library for Clojure
https://github.com/zoowii/clj-jsonrpc
clj clojure jsonrpc
Last synced: 4 months ago
JSON representation
A simple JSON-RPC 2.0 library for Clojure
- Host: GitHub
- URL: https://github.com/zoowii/clj-jsonrpc
- Owner: zoowii
- License: epl-1.0
- Created: 2017-02-27T13:28:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T09:38:21.000Z (over 6 years ago)
- Last Synced: 2025-06-22T18:52:19.634Z (about 1 year ago)
- Topics: clj, clojure, jsonrpc
- Language: Clojure
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-jsonrpc
A Clojure library for JSON-RPC 2.0 protocol
## Usage
Leiningen/Boot
```
[clj-jsonrpc "0.1.1-dev"] ;; use the latest version number
```
Gradle
```
compile "clj-jsonrpc:clj-jsonrpc:${version-number}"
```
Maven
```
clj-jsonrpc
clj-jsonrpc
${version-number}
```
Demo Usage
```
(def rpc-handlers {
:sum (fn [& params] (apply + params))
})
(jsonrpc/defhandlers rpc-server/rpc-conn
rpc-handlers)
(defn run-jetty-demo-server [& args]
(println "hello, jetty demo")
(run-jetty #'rpc-server/app {:port 8080}))
```
## License
Copyright © 2017 zoowii
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.