proxy.golang.org : github.com/shynome/jsonrpc2
Package jsonrpc2 is an easy-to-use, thin, minimalist implementation of the JSON-RPC 2.0 protocol with a handler for HTTP servers. It avoids implementing any HTTP helper functions and instead simply provides conforming Request and Response Types, and an http.HandlerFunc that handles single and batch Requests, protocol errors, and recovers panics from the application's RPC method calls. It strives to conform to the official specification: https://www.jsonrpc.org. Clients can use the Request, Response, and Error types with the json and http packages to make HTTP JSON-RPC 2.0 calls and parse their responses. Servers must implement their RPC method functions to match the MethodFunc type. Methods must be registered with a name using RegisterMethod(). Read the documentation for RegisterMethod and MethodFunc for more information. For convenience, methods can use RemarshalJSON() for converting the abstract params argument into a custom concrete type. After all methods are registered, set up an HTTP Server with HTTPRequestHandler as the handler. This example makes all of the calls from the examples in the JSON-RPC 2.0 specification and prints them in a similar format.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/shynome/jsonrpc2
License: MIT
Latest release: almost 7 years ago
First release: almost 7 years ago
Namespace: github.com/shynome
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago