build a json from a csv file