I am still stuck.
I visited json.org, but didn't find a processing library and not a compiled version of JAVA.
The closest I get is
https://github.com/douglascrockford/JSON-java/blob/master/JSONObject.javawhat I get here is douglascrockford-JSON-java-9bb970c.zip
but no JAR in it.
Renaming folder in org.json and puitting it in the libraries folder doesn't work.
please help.
Thanks!
My Code is
- import org.json.*;
- String baseURL = "http://www.xxxxxxx.com/api/list.json";
- String apiKey = "519cxxxxxxxxxxxxxxxxx0";
- // String inst_id1 = "21";
- int getNumberOfProjects(int inst_id) {
- String request = baseURL + "?api_key=" + apiKey + "&page=1&per_page=4000&institution_id=" + inst_id;
- String result = join( loadStrings( request ), "");
- int numberOfElements=0;
- // println( result );
- try {
- JSONObject Data1 = new JSONObject(join(loadStrings(request), ""));
- JSONArray results = Data1.getJSONArray("items");
- // println("----------------------");
- numberOfElements = results.length();
- println (numberOfElements);
- }
- catch (JSONException e) {
- println ("There was an error parsing the JSONObject.");
- };
-
- return (numberOfElements);
-
- }
Well, I have a few tabs (files) in my program, that is of course only the JSON tab...
Thanks!
Chrisir