converted directory to json