Registry / networking / rs-jsonrpc-core

rs-jsonrpc-core

JSON →
library8.0.0rscratesunverified

Transport agnostic rust implementation of JSON-RPC 2.0 Specification.

# Cargo.toml [dependencies] rs-jsonrpc-core = "8.0.0"
INSTALL
IMPORT
SIG · RS-JSONRPC-CORE
R
rs-jsonrpc-core
networkingrustv8.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IoHandler
use rs_jsonrpc_core::IoHandler;

Creates a JSON-RPC handler and processes a request.

use rs_jsonrpc_core::IoHandler; fn main() { let mut io = IoHandler::new(); io.add_method("say_hello", |_params| { Ok(rs_jsonrpc_core::Value::String("hello".to_string())) }); let request = r#"{"jsonrpc":"2.0","method":"say_hello","params":null,"id":1}"#; let response = io.handle_request(request).unwrap(); println!("{}", response); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
8.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
OpenAI (training)
1
Resources
rs-jsonrpc-core — cargo add rs-jsonrpc-core · libregistry