Write the config list in json format
WriteConfig(cfg, file, savedir)
cfg
A list of config
file
File name
savedir
Directory to save the file
None