I am very new to r and json. And I am trying to read multiple json files located in one folder using R
filenames <- list.files("./data/1st-transcripts",
pattern="*.json", full.names=TRUE)
ldf <- lapply(filenames, fromJSON)
But while running the above code, I am getting following error
Error in parse_con(txt, bigint_as_char) : parse error: trailing garbage
true, "__ts": 1662058422212}{"_id": "6310f7d09e646801f2ca0a
(right here) ------^
I tried using stream_in(file(path)) and readLines() but it doesn't work.
How can I fix this error?
I will really appreciate any help or suggestion