def part_decode(part):
    """Decode a part of a JSON pointer.

    >>> part_decode("foo")
    'foo'
    >>> part_decode("~0foo")
    '~foo'
    >>> part_decode("foo~0")
    'foo~'
    >>> part_decode("~1foo")
    '/foo'
    >>> part_decode("foo~1")
    'foo/'
    >>> part_decode("f~1o~0o")
    'f/o~o'
    >>> part_decode("~00")
    '~0'
    >>> part_decode("~01")
    '~1'
    >>> part_decode("0")
    '0'
    """
    return part.replace("~1", "/").replace("~0", "~")