<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vocab_to_json(vocab: Vocab, path: str):
 """ Saves vocabulary in human-readable json. :param vocab: Vocabulary mapping. :param path: Output file path. """

    with open(path, "w", encoding=C.VOCAB_ENCODING) as out:
        json.dump(vocab, out, indent=4, ensure_ascii=False)
        logger.info('Vocabulary saved to "%s"', path)