We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_json works perfectly fine for local json files but I cannot get it to read URL file paths, I get the error:
Error in readChar(path, nchars = file.info(path)$size) : invalid 'nchars' argument
I suspect the function might read a patch similar to this one: https://github.com/rstudio/profvis/blob/master/R/file_contents.R
thanks!
The text was updated successfully, but these errors were encountered:
It seems the plan is to revamp the read_json function here, as that is definitely an unhelpful error.
read_json
In any case, jsonlite::fromJSON works fine with URL sources, and that is what as.tbl_json calls behind the scenes. I.e. I recommend the following:
jsonlite::fromJSON
as.tbl_json
devtools::install_github('jeremystan/tidyjson') library(tidyjson) ## 'http://url/to/my/json' %>% as.tbl_json() ## most verbs call as.tbl_json() behind the scenes too "http://citibikenyc.com/stations/json" %>% json_types() #> # A tbl_json: 1 x 2 tibble with a "JSON" attribute #> `attr(., "JSON")` document.id type #> <chr> <int> <fctr> #> 1 "{\"executionTime..." 1 object
Sorry, something went wrong.
No branches or pull requests
read_json works perfectly fine for local json files but I cannot get it to read URL file paths, I get the error:
Error in readChar(path, nchars = file.info(path)$size) :
invalid 'nchars' argument
I suspect the function might read a patch similar to this one:
https://github.com/rstudio/profvis/blob/master/R/file_contents.R
thanks!
The text was updated successfully, but these errors were encountered: