<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_from_json(path: str, encoding: str = C.VOCAB_ENCODING) -> Vocab: """ Saves vocabulary in json format. :param path: Path to json file containing the vocabulary. :param encoding: Vocabulary encoding. :return: The loaded vocabulary. """

    with open(path, encoding=encoding) as inp:
        vocab = json.load(inp)
        utils.check_condition(is_valid_vocab(vocab), "Vocabulary %s not valid." % path)
        logger.info('Vocabulary (%d words) loaded from "%s"', len(vocab), path)
        return vocab