R/parseJSON.R

Defines functions parse_string parseJSON

parseJSON <- function(txt, bigint_as_char = FALSE) {
  if(inherits(txt, "connection")){
    parse_con(txt, bigint_as_char)
  } else {
    parse_string(txt, bigint_as_char)
  }
}

#' @useDynLib jsonlite R_parse
parse_string <- function(txt, bigint_as_char){
  if (length(txt) > 1) {
    txt <- paste(txt, collapse = "\n")
  }
  .Call(R_parse, txt, bigint_as_char)
}

Try the jsonlite package in your browser

Any scripts or data that you put into this service are public.

jsonlite documentation built on June 22, 2024, 11:05 a.m.