read.json: Read json in as a list

Description Usage Arguments Examples

View source: R/read_json.R

Description

Read in a json file and parse it into a R list. If both parameters (file,url) are provided, then url value is used.

Usage

1
read.json(file = "", url = "")

Arguments

file

the name of the file, where the json is read from.

url

the url of the json to read.

Examples

1
2
3
4
read.json('examples/example_json_self.json') # Reads in an example json as list from examples/.
read.json('examples/example_json_self_written.json') # Reads in an example json as list from examples/.
read.json('examples/dnd_example.json') # Reads in an example json as list from examples/.
read.json(url = 'https://www.dnd5eapi.co/api/spells/acid-arrow/' ) # Reads in json from given url as list.

moledoc/parse.json documentation built on Jan. 1, 2021, 2:54 p.m.