When I give toJSON a list of lists and an empty collapse string, the function seems to fail to collapse the JSON string properly. Below is a minimal example.
library(RJSONIO)
x1 <- list(a=1,b=2)
x2 <- list(c=3,d=4)
x3 <- list(x1,x2)
toJSON(x1,collapse="")
toJSON(x2,collapse="")
toJSON(x3,collapse="")
[1] "{ \"a\": 1,\"b\": 2 }"
[1] "{ \"c\": 3,\"d\": 4 }"
[1] "[ {\n \"a\": 1,\n\"b\": 2 \n},{\n \"c\": 3,\n\"d\": 4 \n} ]"