Feature: JSON-RPC Request validation/parsing
taylorjdawson opened this issue · comments
Taylor Dawson commented
This library has a method that parses JSON-RPC responses. It would be nice to add the ability to parse/validate JSON-RPC requests.
Beau commented
You can do this with jsonrpcserver.
from jsonrpcserver.dispatcher import deserialize, schema, validate
request = '{"jsonrpc": "2.0", "method": "ping", "id": 1}'
validate(deserialize(request), schema)
Raises jsonschema.ValidationError if invalid.
Taylor Dawson commented
Great thanks!