Convert country file to json format