2

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?

Andrea
  • 21
  • 2

1 Answers1

0

There must be something wrong with your requested URL. If that's not the problem, try it with the following packages: library(RCurl) or library(RJSONIO)

Redfood
  • 146
  • 1
  • 5