switching to jsonlite to solve some conversion bugs