Takes a JSON-RPC 2.0 payload (Object) and tries to parse it into a JSON. If successful, determine what object is it (response, notification, success, error, or invalid), and return it's type and properly formatted object.
an JsonRpcParsed object with type and payload:
JsonRpcParsed
type
payload
{ type: <Enum, 'request'|'notification'|'success'|'error'|'invalid'> payload: <JsonRpc|JsonRpcError> }
public
Takes a JSON-RPC 2.0 payload (Object) and tries to parse it into a JSON. If successful, determine what object is it (response, notification, success, error, or invalid), and return it's type and properly formatted object.
Returns
an
JsonRpcParsed
object withtype
andpayload
:{ type: <Enum, 'request'|'notification'|'success'|'error'|'invalid'> payload: <JsonRpc|JsonRpcError> }
Api
public