Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunhuachuang/jsonrpc-parse
parse JSON-RPC (2.0) from stream Bytes or deparse JSON-RPC to Bytes
https://github.com/sunhuachuang/jsonrpc-parse
bytes json-rpc parse rust
Last synced: about 2 months ago
JSON representation
parse JSON-RPC (2.0) from stream Bytes or deparse JSON-RPC to Bytes
- Host: GitHub
- URL: https://github.com/sunhuachuang/jsonrpc-parse
- Owner: sunhuachuang
- License: mit
- Created: 2018-12-07T07:15:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T02:58:29.000Z (over 5 years ago)
- Last Synced: 2024-11-19T14:58:05.201Z (about 2 months ago)
- Topics: bytes, json-rpc, parse, rust
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonrpc-parse
parse JSON-RPC (2.0) from TCP Bytes or deparse JSON-RPC to Codec and Bytes
```
[dependencies]
jsonrpc_parse = "0.1"
``````Rust
use jsonrpc_parse::httpcodec::{HTTPCodec, HTTP};// use HTTPCodec to parse frame bytes, the result is HTTPCodec's HTTP
match http {
HTTP::Request(req) => {}
HTTP::Response(resp) => {}
_ => {} // other is Response about the Error, can return direct.
}```