ckanext-datapackager icon indicating copy to clipboard operation
ckanext-datapackager copied to clipboard

warning when reading datapackage.json with R

Open GeraldGrootRoessink opened this issue 6 years ago • 0 comments

This warning happens when I read a generated datapackage.json:

library("jsonlite") json_file <- 'https://onderwijsdata.duo.nl/dataset/rio-objecten-v0/datapackage.json' json_data <- fromJSON(paste(readLines(json_file), collapse="")) Warning message: In readLines(json_file) : incomplete final line found on 'https://onderwijsdata.duo.nl/dataset/rio-objecten-v0/datapackage.json' for(i in 1:length(json_data$resources$path)) { if(!is.na(json_data$resources$format[i])) { if(json_data$resources$format[i]=="CSV") { path_to_file = json_data$resources$path[i] assign(json_data$resources$name[i], read.csv(url(path_to_file))) } } }

Not sure what the rules are. Maybe the package should end with a Linefeed?

GeraldGrootRoessink avatar Jul 18 '18 11:07 GeraldGrootRoessink