Skip to content

Commit

Permalink
Register methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Sep 20, 2023
1 parent 76c1c54 commit 36e9e61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ S3method(jq,connection)
S3method(jq,default)
S3method(jq,jqr)
S3method(jq,json)
S3method(jqr,connection)
S3method(jqr,default)
S3method(print,jq_query)
S3method(print,jqson)
export("%>%")
Expand Down
2 changes: 2 additions & 0 deletions R/jqr.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jqr <- function(x, ...) {
UseMethod("jqr", x)
}

#' @export
jqr.default <- function(x, query, flags){
stopifnot(is.character(query))
stopifnot(is.numeric(flags))
program <- jqr_new(query, flags = flags)
jqr_feed(program, json = x, unlist = TRUE, finalize = TRUE)
}

#' @export
jqr.connection <- function(x, query, flags, out = NULL){
con <- x
val <- invisible()
Expand Down

0 comments on commit 36e9e61

Please sign in to comment.