title: Parsing list of json
body: <p>I need to parse list of json stored in a single file !</p>
  
  <p>What I have done so far is,
  test.json file contains:</p>
  
  <pre><code>{"location":"lille","lat":28.4,"long":51.7,"country":"FR"}
  </code></pre>
  
  <p>with this file I have the code below</p>
  
  <pre><code>    public class JsonReader {
          public static void main(String[] args) throws ParseException {
              JSONParser parser = new JSONParser();
      try {
      Object obj = parser.parse(new FileReader("c:\\test.json"));
      JSONObject locationjson= (JSONObject) obj;
          String location= (String) locationjson.get("location");
          System.out.printf("%s",location);
      long lat = (Long) locationjson.get("lat");
      System.out.printf("\t%d",lat);
  //similarly for other objects           
  </code></pre>
  
  <p>This is a working code and I am able to print only one json in the file test.json</p>
  
  <p>Now if I have to print a list of json in file: test1.json as shown below: each line is a single valid json and there are list of json in a single file. What I need is to parse each json and print it in each line. Will using a bean class work?</p>
  
  <pre><code>{"Atlas":{"location":"lille","lat":28.4,"long":51.7,"country":"FR"}}
  {"Atlas":{"location":"luxum","lat":24.1,"long":54.7,"country":"LU"}}
  {"Atlas":{"location":"ghent","lat":28.1,"long":50.1,"country":"BE"}}
  {"Atlas":{"location":"alborg","lat":23.4,"long":53.7,"country":"DN"}}
  </code></pre>
  
  <p>Your help is appreciated !</p>