1

I need to find certain information from a JSON data set that my company acquired. When I try to import it to a variable via the "fromJSON" method, I get the error listed in the title. The data set contains information for over 16,000 files, so searching for the problem manually just isn't an option (especially since it's JSON, so there are tons of colons). Is there a way in R to find the source, or at least line-number, of the problematic character(s)?

AlBeast
  • 25
  • 6
  • You are importing all the files with just one call to `fromJSON`? What exactly are you running? – MrFlick Jun 13 '17 at 21:34

1 Answers1

1

Paste the json here and validate it. It will tell you where the json is invalid.

https://jsonlint.com/

Derek Lawrence
  • 1,551
  • 2
  • 16
  • 36
  • does jsonlint not handle that many characters? he didn't state theres 16,000 different json files he said the json file had information relating to 16,000 different files. – Derek Lawrence Jun 13 '17 at 21:22
  • You are right. only data describing 16000 files. not 16000 files of data. – G5W Jun 13 '17 at 21:23
  • Thanks Derek, this has been greatly helpful! And thanks to jsonlint, I'm realizing this json file (which is supposed to be a collection of 16,000+ dictionaries) has a ton of errors, like missing curly braces and missing brackets around the whole thing. Also, jsonlint _can_ handle this much information, it's just rather slow – AlBeast Jun 14 '17 at 15:10