jsonrpc2 library

Classes

BatchServerProxyBase
BatchServerProxyBase is like ServerProxyBase, but it handles the special case where the batch formulation of JSON-RPC v2 is used.
JsonRpcMethod
JsonRpcMethod class holds name and args of a method request for JSON-RPC v2
MethodRequest
MethodRequest holds a specially formed JSON object requesting to perform a method on the server.
Notification
Empty class. We just need to say a response "is" a Notification
ServerProxyBase
ServerProxyBase is a base class for a JSON-RPC v2 client.

Enums

paramsTypes
Identifiers for the types of params, that determine how they need to be handled

Constants

jsonRpcV1 → const String
Version string for JSON-RPC v1
jsonRpcV2 → const String
Version string for JSON-RPC v2

Functions

encodeResponse(dynamic response) String
Encode the result into JSON.
jsonRpc(String request, Dispatcher dispatcher) Future<String>
Accept a JSON-RPC String request and return a String
jsonRpcDispatch(Map<String, dynamic> request, Dispatcher dispatcher) → dynamic
Invoke a method Given a parsed JSON-RPC request and an initialized Dispatcher, return a Future with a Map of the result of the instance's method or a Notification object
jsonRpcExec(Object request, Dispatcher dispatcher) Future
Execute the request.
makeExceptionMap(Object anException, String version, [dynamic id]) Map
Instead of crashing the server, we send the exception back to the client.
parseJson(String aString) → dynamic
Parse the JSON string