Skip to content

Commit

Permalink
Add documentation for the generic S3 method vec_proxy_json
Browse files Browse the repository at this point in the history
  • Loading branch information
coissac committed May 22, 2024
1 parent 54f5a5a commit 022e01f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions R/asJSON.vctrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ setMethod("asJSON", "vctrs_vctr", function(x, ...) {
)
})

#' JSON conversion proxy
#'
#' vec_proxy_json method returns proxy objects, i.e. an atomic vector or a list of atomic vectors,
#' able to be converted to JSON using the jsonlite package. This is a generic S3 method, that has
#' to be implemented for subclasses requesting particualar JSON conversion. A default implementation
#' is provided for `vctrs_vctr` class.
#'
#' @param x object instance of class `vctrs_vctr` to be converted to JSON
#'
#' @return an atomic vector or a list of atomic vectors.
#' @export
vec_proxy_json <- function(x) {
UseMethod("vec_proxy_json", x)
Expand Down
20 changes: 20 additions & 0 deletions man/vec_proxy_json.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 022e01f

Please sign in to comment.