ropensci / jqr

R interface to jq
https://docs.ropensci.org/jqr
Other
143 stars 13 forks source link

jq should be able to take file paths or a URL as an argument #55

Closed cboettig closed 5 years ago

cboettig commented 7 years ago

From a purely user-interface / convenience perspective, it would be nice for jq function to be able to take a file path or URL as an argument, just so that the interface is consistent with the interface of things like fromJSON, jsonld_* fns, etc.

sckott commented 7 years ago

thanks @cboettig

agree this would be good - will look into it

sckott commented 6 years ago

@cboettig playing around on remotes::install_github("ropensci/jqr@input") - can you try now with file paths and urls? see, e.g, https://github.com/ropensci/jqr/blob/input/R/jqr.R#L30-L37

jeroen commented 6 years ago

Ah sorry @sckott I didn't realize you were also working on this. I just pushed streaming support to master.

sckott commented 6 years ago

@jeroen no worries, my attempt was just trying to handle files and urls, i'm sure what you did is better

jeroen commented 6 years ago

Yes I rewrote the internals on my flight to YVR. You can now do incremental parsing. See ?jqr_new.

sckott commented 6 years ago

with https://github.com/ropensci/jqr/compare/72d4a8e1a70f...93fe60ad97d1

we now can pass a file or url as a connection, like base::file() or base::url()

sckott commented 6 years ago

@cboettig see above comment. and update from master. Does that work to use file/url?

sckott commented 5 years ago

sorted now