title: Parsing JSON string in Java
body: <p>I am trying to parse a JSON string in java to have the individual value printed separately. But while making the program run I get the following error-</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Stub!
         at org.json.JSONObject.&lt;init&gt;(JSONObject.java:7)
         at ShowActivity.main(ShowActivity.java:29)
  </code></pre>
  
  <p>My Class looks like- </p>
  
  <pre><code>import org.json.JSONException;
  import org.json.JSONObject;
  
  public class ShowActivity {
     private final static String  jString = "{" 
     + "    \"geodata\": [" 
     + "        {" 
     + "                \"id\": \"1\"," 
     + "                \"name\": \"Julie Sherman\","                  
     + "                \"gender\" : \"female\"," 
     + "                \"latitude\" : \"37.33774833333334\"," 
     + "                \"longitude\" : \"-121.88670166666667\""            
     + "                }" 
     + "        }," 
     + "        {" 
     + "                \"id\": \"2\"," 
     + "                \"name\": \"Johnny Depp\","          
     + "                \"gender\" : \"male\"," 
     + "                \"latitude\" : \"37.336453\"," 
     + "                \"longitude\" : \"-121.884985\""            
     + "                }" 
     + "        }" 
     + "    ]" 
     + "}"; 
     private static JSONObject jObject = null;
  
     public static void main(String[] args) throws JSONException {
         jObject = new JSONObject(jString);
         JSONObject geoObject = jObject.getJSONObject("geodata");
  
         String geoId = geoObject.getString("id");
             System.out.println(geoId);
  
         String name = geoObject.getString("name");
         System.out.println(name);
  
         String gender=geoObject.getString("gender");
         System.out.println(gender);
  
         String lat=geoObject.getString("latitude");
         System.out.println(lat);
  
         String longit =geoObject.getString("longitude");
         System.out.println(longit);                   
     }
  }
  </code></pre>
  
  <p>Let me know what is it I am missing, or the reason why I do get that error everytime I run the application. Any comments would be appreciated.</p>