add R code for reading JSON file line by line