def data2dict(data):
    """Convert a DFTData object into a a dictionary of json-izable objects."""
    nruter = dict()
    nruter['BoltzTraP2_type'] = 'DFTData'
    nruter['ebands'] = data.ebands
    nruter['mommat'] = data.mommat
    nruter['kpoints'] = data.kpoints
    nruter['atoms'] = data.atoms
    nruter['fermi'] = data.fermi
    nruter['dosweight'] = data.dosweight
    nruter['nelect'] = data.nelect
    nruter['magmom'] = data.magmom
    return nruter
