Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 937 → Rev 938

/trunk/src/org/tela_botanica/del/client/utils/UtilitairesAutoCompletionService.java
2,6 → 2,7
 
import com.google.gwt.http.client.Response;
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
 
27,6 → 28,19
return chaineTraitee;
}
public static String[] parserResultatRetourSimple(Response response) {
JSONObject responseValue = JSONParser.parseStrict(response.getText()).isObject();
JSONArray noms = responseValue.get("resultats").isArray();
String[] valeurs = new String[0];
final int taillemax = noms.size();
valeurs = new String[taillemax];
for (int i = 0; i < taillemax; i++) {
valeurs[i] = (noms.get(i).isArray().get(0).isString().stringValue());
}
return valeurs;
}
public static String[] parserRetourSimple(Response response) {
final JSONValue responseValue = JSONParser.parseStrict(response.getText());
JSONArray noms;
40,7 → 54,6
valeurs[i] = (noms.get(i).isArray().get(0).isString().stringValue());
}
}
return valeurs;
}