I thought this would be simple but it keeps crashing with InvocationTargetException
at reader.hasNext()
.
File jsonInputFile = new File(root + "/dicts/phrases.json");
JsonReader reader = new JsonReader(new FileReader(jsonInputFile));
while (reader.hasNext()) {
System.out.println(reader.nextName());
}
What exactly is wrong with this? The while loop just goes on forever despite the json file only have one line.