def to_json_format(conf):
    '''Convert fields of a python dictionary to be dumped in json format'''
    if 'fmode' in conf:
        conf['fmode'] = oct(conf['fmode'])[-3:]
    if 'dmode' in conf:
        conf['dmode'] = oct(conf['dmode'])[-3:]