I have a JSON file of the following format and would like to parse the data to insert into a table. I'm stuck on how to extract data from the file. The data looks like this:
{"business_id": "vcNAWiLM4dR7D2nwwJ7nCA", "full_address": "4840 E Indian School Rd\nSte 101\nPhoenix, AZ 85018", "hours": {"Tuesday": {"close": "17:00", "open": "08:00"}, "Friday": {"close": "17:00", "open": "08:00"}, "Monday": {"close": "17:00", "open": "08:00"}, "Wednesday": {"close": "17:00", "open": "08:00"}, "Thursday": {"close": "17:00", "open": "08:00"}}, "open": true, "categories": ["Doctors", "Health & Medical"], "city": "Phoenix", "review_count": 7, "name": "Eric Goldberg, MD", "neighborhoods": [], "longitude": -111.98375799999999, "state": "AZ", "stars": 3.5, "latitude": 33.499313000000001, "attributes": {"By Appointment Only": true}, "type": "business"}
I have this code until now:
fReader = new FileReader(filePath);
bufferedReader = new BufferedReader(fileReader);
String line;
bufferedReader.readLine();
int index = 0;
while ((line = bufferedReader.readLine()) != null) {
String businessInfo[] = line.split("\t");
//add a new object based on my OOP design