R/0030_get_json.R

Defines functions get_json

Documented in get_json

#' ----------------
#' function get_json
#' -----------------
#'
#' @param r response
#' @description Assume response is json, get the content of response, and then extract json.  Finally, convert to an R object.
#' @return json_content
#' @export
#'
get_json <- function(r) {
  text_content <- httr::content(r,"text")
  json_content <- text_content %>% jsonlite::fromJSON()
}
jimrothstein/youtube_api documentation built on Nov. 6, 2022, 7:26 a.m.