title: reading JSONObject from JSON file
body: <p>What would be the easiest way to load a file containing JSON into a JSONObject.</p>
  
  <p>parsing a file into a JSONObject - w/o the intermittent String object (arguably memory wasting)</p>
  
  <p>This is what I have, but it throws an exception:</p>
  
  <pre><code>public class AlphabetGestures {
  
    private Map&lt;Character,Vector&lt;Point&gt;&gt; mMap;
  
  public AlphabetGestures(String jsonFileName) throws JSONException {
      mMap = new HashMap&lt;Character,Vector&lt;Point&gt;&gt;() ;
      // parsing a file into a JSONObject - w/o the intermittent String object (arguably memory wasting)
      File f = new File(jsonFileName); // making File object for .json file.
      JSONObject masterJSON = new JSONObject(f.toString()); 
  // giving  .json file string to jsonvalue parser
       JSONArray characters = masterJSON.names();
      for ( int c = 0; c &lt; characters.length(); c++ ) {   
   // this loop will get each object from jsonArr
          String character = characters.getString(c);
          JSONArray pointsJSON = masterJSON.getJSONArray(character);  
  // this will get each element from  jsonarray and make subarray for (A, B C ... )
          Vector&lt;Point&gt; pointsVector = new Vector&lt;Point&gt;();
          for ( int i = 0; i &lt; pointsJSON.length(); i++ ) {
              JSONArray point = pointsJSON.getJSONArray(i);
              pointsVector.add(new Point(point.getInt(0), point.getInt(1)));
          }
   mMap.put(character.charAt(0), pointsVector);  
  // put pointVector in mMap with key temp.
      }
  }
  public void scribble(char letter, UiDevice uiDevice){
      //System.out.println("here");
      //AlphabetGestures Y =  new AlphabetGestures() ;
      Vector&lt;Point&gt; points = mMap.get(letter) ;
      System.out.println("------------------");
      System.out.println(points);
      if(points!=null){
      uiDevice.swipe(points.toArray(new Point[points.size()]), 5);
      }
  }
  
  
  
  
  
  Output:- while running the test case
  
  Error in testAccordion:
  java.lang.NoSuchMethodError: ionmini.automate.AlphabetGestures.&lt;init&gt;
  at ionmini.automate.AccordionDrag.testAccordion(AccordionDrag.java:33)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at          com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
  at  com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
  at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
  at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
  at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
  at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>