# A simple example
json <- c('[1, 2, 3]', '{"k1": 1, "k2": 2}', '1', 'null')
# Complexity is larger than length for nested objects
json %>% json_lengths
# Worldbank objcts are either length 7 or 8
library(magrittr)
worldbank %>% json_lengths %$% table(length)
# All commits are length 8
commits %>% gather_array %>% json_lengths %$% table(length)
Run the code above in your browser using DataLab