I have converted a json data from a .json file to an R object with using fromJSON()
of jsonlite library like this:
library(jsonlite)
jsonR<-fromJSON(txt="data.json")
If I explore the stringed values of the jsonR
object I meet some strange sequences of chars.
For example if a string value of the original "data.json" was then R read it as \xf0\u009f\u0098©. And when I write this value back to file with cat()
it becomes < f0>.
Can anyone suggest how one is supposed to do for keeping the correct original encoding while converting?