Code example for JSONTokener

Methods: nextValue

0
			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;
			while ((line = reader.readLine()) != null) {