Code example for JSONArray

Methods: getJSONArray, put

0
		JSONArray responce = _request(url, channel);
 
		if (this.CIPHER_KEY.length() > 0) {
 
			try { 
				JSONArray messageArray = responce.getJSONArray(0);
				PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
				messageArray = pc.decryptJSONArray(messageArray);
				responce.put(0, messageArray);
			} catch (JSONException e) {
				 
				e.printStackTrace();
			} 
 
			// Decrpyt Messages 
 
			return responce;
		} else { 
			return _request(url, channel);
		} 
	}