added JSON api for flash config + unit test