Lets say that I have the following json file:
{
\"id\": \"000018ac-04ef-4270-81e6-9e3cb8274d31\",
\"currentCompany\": \"\",
\"currentTitle\": \"--\",
Surprised this was never answered! Using the jsonlite package, you can collapse your json data into one character element using paste(x, collapse="")
removing EOF markers for proper import into an R dataframe. I, too, faced a pretty-printed json with exact error:
library(jsonlite)
json <- do.call(rbind,
lapply(paste(readLines(Usersfile, warn=FALSE),
collapse=""),
jsonlite::fromJSON))