adding proper handeling of flavors in a json serializable dict