@classmethod<EOL><INDENT>def _transcoding_dict(cls, data):<DEDENT>
if not isinstance(data, dict):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>result = {}<EOL>for k, v in data.items():<EOL><INDENT>k = cls._transcoding(k)<EOL>if isinstance(v, dict):<EOL><INDENT>v = cls._transcoding_dict(v)<EOL><DEDENT>elif isinstance(v, list):<EOL><INDENT>v = cls._transcoding_list(v)<EOL><DEDENT>else:<EOL><INDENT>v = cls._transcoding(v)<EOL><DEDENT>result.update({k: v})<EOL><DEDENT>return result<EOL>
编码转换 for dict
:param data: 需要转换的 dict 数据
:return: 转换好的 dict