Things I've gathered from reading github issues of the existing #RStats JSON packages (e.g. {jsonlite}) is that:

* Everyone has weird data
* How nesting should be handled is different for every user
* How to handle NA/NULL when writing JSON is different for every user
* How to handle NA/NULL when reading JSON is different for every user.

Summary: JSON + R = prickly beast!

As a fantastic example of R/JSON issues:

Namibia missing from dataset!

A certified #NoPrize if you can guess why without visiting the issue!!

https://github.com/jeroen/jsonlite/pull/318

#Rstats

Added naStrings option to 'null_to_na()' and precessors by joachim-gassen · Pull Request #318 · jeroen/jsonlite

Tries to address #98 and #314. I was also affected by this corner case (downloading of Google Trends data for Namibia with the {gtrendsR} package failing systematically). As it is likely to regular...

GitHub
@coolbutuseless oh dear 😅