I am using R's RJSONIO to read json from a file. The json contains unicode characters, which get read incorrectly.
The code works when the json is passed as string as shown by the author of the R package in the question on stackoverflow How to correctly deal with escaped Unicode Characters in R e.g. the em dash (—).
However when the json is read from a file, it does not produce the correct unicode representation. As seen below:
fromJSON(content="~/MTS/temp")
$query
$query$categorymembers
$query$categorymembers[[1]]
$query$categorymembers[[1]]$ns
[1] 0
$query$categorymembers[[1]]$title
[1] "Banach\023Tarski paradox"
Where ~/MTS/temp contains:
{"query":{"categorymembers":[{"ns":0,"title":"Banach\u2013Tarski paradox"}]}}`