'Unable to load json file in R

I get a NULL value when trying to load my .json file in R studio. I've tried both loading the file with the jsonlite and the rjson package, but with no result.

Tried both:

library("rjson")

result <- fromJSON(file = "ice.json")

&

library(jsonlite)

winners <- fromJSON("ice.json", flatten=TRUE)

But both return NULL value when trying to load in R.

(The json file consists of streamed tweets via the twitter API, the.json file starts and ends with the following code:)

    {"created_at":"Tue Feb 22 11:18:05 +0000 2022",'
...
"timestamp_ms":"1645528688239"}

Most thankful for any clues on how to solve this issue!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source