def _dict_to_obj(self, d):
    """Converts a dictionary of json object to a Python object."""
    if JsonEncoder.TYPE_ID not in d:
      return d

    type_name = d.pop(JsonEncoder.TYPE_ID)
    if type_name in _TYPE_NAME_TO_DECODER:
      decoder = _TYPE_NAME_TO_DECODER[type_name]
      return decoder(d)
    else:
      raise TypeError("Invalid type %s.", type_name)
def _dict_to_obj ( self , d ) : if JsonEncoder . TYPE_ID not in d : return d type_name = d . pop ( JsonEncoder . TYPE_ID ) if type_name in _TYPE_NAME_TO_DECODER : decoder = _TYPE_NAME_TO_DECODER [ type_name ] return decoder ( d ) else : raise TypeError ( "Invalid type %s." , type_name )
Converts a dictionary of json object to a Python object.