jsonToTibble: Helper function to transform a JSON object to a tibble

View source: R/jsonToTibble.R

jsonToTibbleR Documentation

Helper function to transform a JSON object to a tibble

Description

Helper function to transform a JSON object to a tibble

Usage

jsonToTibble(jsonfile)

Arguments

jsonfile

An object obtained when a JSON file is downloaded

Value

A tibble

Examples

url <- "http://api.adu.org.za/cwac/sites/list?province=north20%west"
myfile <- httr::RETRY("GET", url) %>%
httr::content(as = "text", encoding = "UTF-8")
jsonfile <- rjson::fromJSON(myfile)
jsonToTibble(jsonfile)

AfricaBirdData/CWAC documentation built on Aug. 5, 2024, 12:40 a.m.