File: collapse_object.R

package info (click to toggle)
r-cran-jsonlite 1.9.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: ansic: 3,792; sh: 9; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#' @useDynLib jsonlite C_collapse_object C_collapse_object_pretty
collapse_object <- function(x, y, indent = 0L) {
  if(is.na(indent)){
    .Call(C_collapse_object, x, y)
  } else {
    .Call(C_collapse_object_pretty, x, y, indent)
  }
}

#' @useDynLib jsonlite C_row_collapse_object
row_collapse_object <- function(x, m, indent = NA_integer_){
  .Call(C_row_collapse_object, x, m, indent = indent)
}