@classmethod<EOL><INDENT>def from_json(cls, json_str):<DEDENT>
vocab_dict = json.loads(json_str)<EOL>unknown_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab = cls(unknown_token=unknown_token)<EOL>bert_vocab._idx_to_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._token_to_idx = vocab_dict.get('<STR_LIT>')<EOL>if unknown_token:<EOL><INDENT>bert_vocab._token_to_idx = DefaultLookupDict(bert_vocab._token_to_idx[unknown_token],<EOL>bert_vocab._token_to_idx)<EOL><DEDENT>bert_vocab._reserved_tokens = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._padding_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._bos_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._eos_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._mask_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._sep_token = vocab_dict.get('<STR_LIT>')<EOL>bert_vocab._cls_token = vocab_dict.get('<STR_LIT>')<EOL>return bert_vocab<EOL>
Deserialize BERTVocab object from json string.

        Parameters
        ----------
        json_str : str
            Serialized json string of a BERTVocab object.

        Returns
        -------
        BERTVocab