def as_dict(self, **kwargs):
    '\n        Convert this object in a json serializable dict (can be use in __init__).\n        Optional keyword input parameter is for internal use only\n        and may prevent json serializability.\n        '
    Magnet_dict = dict()
    if (self.mat_type is None):
        Magnet_dict['mat_type'] = None
    else:
        Magnet_dict['mat_type'] = self.mat_type.as_dict(**kwargs)
    Magnet_dict['type_magnetization'] = self.type_magnetization
    Magnet_dict['Lmag'] = self.Lmag
    Magnet_dict['__class__'] = 'Magnet'
    return Magnet_dict
Convert this object in a json serializable dict (can be use in __init__).
Optional keyword input parameter is for internal use only
and may prevent json serializability.
def as_dict(self, **kwargs):
    '\n        Convert this object in a json serializable dict (can be use in __init__).\n        Optional keyword input parameter is for internal use only\n        and may prevent json serializability.\n        '
    Magnet_dict = dict()
    if (self.mat_type is None):
        Magnet_dict['mat_type'] = None
    else:
        Magnet_dict['mat_type'] = self.mat_type.as_dict(**kwargs)
    Magnet_dict['type_magnetization'] = self.type_magnetization
    Magnet_dict['Lmag'] = self.Lmag
    Magnet_dict['__class__'] = 'Magnet'
    return Magnet_dict