some_fancy_list <- list(complex = list(some_data = 1:3,
other_data = list(name = "Max")),
simple = "awesome overview")
yamlDump(some_fancy_list)
#complex:
# some_data:
# - 1
# - 2
# - 3
# other_data:
# name: Max
#simple: awesome overview
# If you got a character json you can also input it directly
# and the function will automatically convert it to a list
yamlDump('{"a":{"b":["1"]}}')
Run the code above in your browser using DataLab