def _isJsonPath(value):
    """
    Check if the input string represents a valid jsonPath.

    Return a tuple, first element in the tuple is a boolean tells the validation result, while
    the second element contains the error message if there is one.
    """
    if not isinstance(value, dict):
        return (False,
            "Expected a jsonPath dictionary with elements 'path' (string) and optional 'suffix' (boolean)"
            )
    elif 'path' not in value:
        return False, "Missing 'path' element of jsonPath"
    else:
        path = value['path']
        if not isinstance(path, str):
            return (False,
                "'path' element of jsonPath dictionary should be a string")
        if 'suffix' in value:
            suffix = value['suffix']
            if not isinstance(suffix, bool):
                return (False,
                    "'suffix' element of jsonPath dictionary should be a boolean"
                    )
        return True, None
