title: Keep getting this error "Unexpected character ( ) at position 1."
body: <p>I'm having this issue where I'm keep getting this wierd error when I run this simple program at commandline</p>
  
  <p>Here's the Json file</p>
  
  <p><code>{"count":"21740"}</code></p>
  
  <p>Here's the code</p>
  
  <pre><code>import java.io.FileNotFoundException;
  import java.io.FileReader;
  import java.io.IOException;
  import java.util.Iterator;
  
  import org.json.simple.JSONArray;
  import org.json.simple.JSONObject;
  import org.json.simple.parser.JSONParser;
  import org.json.simple.parser.ParseException;
  
  public class EarthQuake {
  
  private static final String filePath = "data.json";
  
  public static void main(String[] args) {
  
      try {
          // read the json file
          FileReader reader = new FileReader(filePath);
  
          JSONParser jsonParser = new JSONParser();
          JSONObject jsonObject = (JSONObject) jsonParser.parse(reader);
  
          // get a String from the JSON object
          String count =  (String) jsonObject.get("count");
          System.out.println("The count is: " + count);
  
  
      } catch (FileNotFoundException ex) {
          ex.printStackTrace();
      } catch (IOException ex) {
          ex.printStackTrace();
      } catch (ParseException ex) {
          ex.printStackTrace();
      } catch (NullPointerException ex) {
          ex.printStackTrace();
      }
  
  }
  
  }
  </code></pre>
  
  <p>But I always get this error</p>
  
  <pre><code>"C:\&gt;java -classpath .;json-simple-1.1.1.jar test
  Unexpected character ( ) at position 1.
          at org.json.simple.parser.Yylex.yylex(Yylex.java:610)
          at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
          at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
          at org.json.simple.parser.JSONParser.parse(JSONParser.java:92)
          at test.main(test.java:22)"
  </code></pre>
  
  <p>I've validated the json file at <a href="http://jsonlint.com/" rel="nofollow">http://jsonlint.com/</a></p>
  
  <p>I don't know what I've done wrong here, please help!</p>