Takes a JSON-RPC 2.0 payload (Object) or batch (Object[]) and tries to parse it.
If successful, determine what objects are inside (response, notification,
success, error, or invalid), and return their types and properly formatted objects.
Returns
a single object or an array of JsonRpcParsed objects with type and payload:
Takes a JSON-RPC 2.0 payload (Object) or batch (Object[]) and tries to parse it. If successful, determine what objects are inside (response, notification, success, error, or invalid), and return their types and properly formatted objects.
Returns
a single object or an array of
JsonRpcParsed
objects withtype
andpayload
:{ type: <Enum, 'request'|'notification'|'success'|'error'|'invalid'> payload: <JsonRpc|JsonRpcError> }
Api
public