• 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 with type and payload:

    { type: <Enum, 'request'|'notification'|'success'|'error'|'invalid'> payload: <JsonRpc|JsonRpcError> }

    Api

    public

    Parameters

    • obj: unknown

    Returns IParsedObject