1

I used rjson and do this JSON <- lapply(data$toParse, fromJSON)

my toParse has 600k rows of simple/short JSON.

However, it is very slow possibly because fromJSON doesn't vectorize operation so I have to use lapply.

I am wondering if there is any better way for parsing a list of JSON?

colinfang
  • 20,909
  • 19
  • 90
  • 173
  • If nothing has changed for the last few months rjson is the only one json parser available for R. Alternative solution could be parsing json some external tools and preprocessing your data. There is pretty extensive list of available libraries on http://www.json.org/ – zero323 Sep 10 '13 at 18:04
  • @zero323 there is also RJSONIO. – Martin Morgan Sep 10 '13 at 19:07

1 Answers1

1

What about pasting the text into an array and parsing, rjson::fromJSON(sprintf("[%s]", paste(data$toParse, collapse=",")))?

Martin Morgan
  • 45,935
  • 7
  • 84
  • 112