Change from RJSONIO to jsonlite, use do.call for calling function with parameters