Export JSON from R

my_list <- list(
  name = "David",
  color = "purple",
  planet = "Mars"
)

toJSON(my_list)