added the possibility to save the flags db as a json file