write.json: Write list as json

Description Usage Arguments Examples

View source: R/write_json.R

Description

Write given list to given file in json format. Structures such as data.frame and data.table work as well (also inside the list).

Usage

1
write.json(to_json, file = "new_file.json")

Arguments

to_json

list that is to be written out as json.

file

the name of the file, where the json is written. By default it is written in the current working directory as 'new_file.json'.

Examples

1
2
3
write.json(lst) # The argument value of lst is in examples/example_list.txt. The result can also be found at examples/example_list_written_out.json
write.json(iris)
write.json(cars)

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