0

I am trying to load a local json file in R. I am using a package called Sofia that includes the json library. I also tried other packages like rjson and the RJSONIO packages but I get the same error

error in ProcessFiles(File=File), unexpected character E.

This is example code when I use the a local package Sofia:

data<-ProcessFiles(file="data1.json",method="Sofia.method")

When I apply the same package to some old .json files it works normally without error. I tried to change the encoding of the file to UTF-8 but the error persists. The file encoding is ANSI Can anybody help with this? I ran the online linter and I seemed to discover the error however I want to fix these syntax errors in multple json files in one step, does anybody know how?

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • 1
    Can you include a short example of a json file that produces this error in your question? What is causing the syntax error? – Marius Jan 31 '20 at 02:52
  • 1
    Please make this question *reproducible*. This includes sample code (including listing non-base R packages), sample *unambiguous* data (e.g., `dput(head(x))` or `data.frame(x=...,y=...)`), and expected output. Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Jan 31 '20 at 05:41

0 Answers0