Code example for JsonReader

Methods: beginObject, endObject, setLenient

1
	} 
	 
	private boolean processInput(InputStream in){
		JsonReader jr;
		try { 
			jr = new JsonReader(new BufferedReader(new InputStreamReader(
					in, "UTF-8")));
 
			jr.setLenient(true);
			jr.beginObject();
 
			/* Read ReturnCode */ 
			Pair<String, Boolean> pair = AdminHelper
					.handleResponse(JsonCustomReader 
							.readJSONRetCode(jr, in));
			 
			if (!pair.getSecond()) {
				errorMessage = pair.getFirst();
				Log.v(TAG, "No Details found.");
				return false;  
			} 
			 
			ArrayList<MessageDetails> messageDetails = JsonCustomReader.readJsonMessages(jr, in);
			jr.endObject();
 
			errorMessage = pair.getFirst();
			details = messageDetails;
			return true;