Skip to content

Commit 022e01f

Browse files
committed
Add documentation for the generic S3 method vec_proxy_json
1 parent 54f5a5a commit 022e01f

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

R/asJSON.vctrs.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ setMethod("asJSON", "vctrs_vctr", function(x, ...) {
99
)
1010
})
1111

12+
#' JSON conversion proxy
13+
#'
14+
#' vec_proxy_json method returns proxy objects, i.e. an atomic vector or a list of atomic vectors,
15+
#' able to be converted to JSON using the jsonlite package. This is a generic S3 method, that has
16+
#' to be implemented for subclasses requesting particualar JSON conversion. A default implementation
17+
#' is provided for `vctrs_vctr` class.
18+
#'
19+
#' @param x object instance of class `vctrs_vctr` to be converted to JSON
20+
#'
21+
#' @return an atomic vector or a list of atomic vectors.
1222
#' @export
1323
vec_proxy_json <- function(x) {
1424
UseMethod("vec_proxy_json", x)

man/vec_proxy_json.Rd

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)