converts folders/files into json