jsontools
jsontools copied to clipboard
What should `format_json_list` return for NA and NULL?
-
no special treatment and simply let
format_json()
do its job. -
extra argument?
-
NA
: is unlikely to occur in a list. Maybe fromparse_json_vector()
? -
NULL
: treated as the missing value in lists
format_json_list(list(list(a = 1), list(a = 1, b = 2), NULL, NA))
#> {"a":[1]} {"a":[1],"b":[2]} {} [null]