Code example for JSONTokener

Methods: nextValue

			String json = readFully(getQuizzInputStream());
			if (json == null) {
				return quizz;
        	JSONTokener tokener = new JSONTokener(json);
        	quizz = new Quizz((JSONObject) tokener.nextValue());
        catch (Exception ex) {
        	Log.e("WeRecruit", "Erreur de chargement du quizz", ex);
		return quizz;
	protected String readFully(InputStream inputStream) throws IOException {
		try { 
			BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
			StringBuilder json = new StringBuilder();
			String line = null;
Connect your IDE to all the code out there  Get Codota for Java