public class

JsonArrayRequest

extends JsonRequest<T>
java.lang.Object
   ↳ com.android.volley.Request<T>
     ↳ com.android.volley.toolbox.JsonRequest<T>
       ↳ com.android.volley.toolbox.JsonArrayRequest

Class Overview

A request for retrieving a JSONArray response body at a given URL.

Summary

[Expand]
Inherited Constants
From class com.android.volley.toolbox.JsonRequest
Public Constructors
JsonArrayRequest(String url, Listener<JSONArray> listener, Response.ErrorListener errorListener)
Creates a new request.
JsonArrayRequest(int method, String url, JSONArray jsonRequest, Listener<JSONArray> listener, Response.ErrorListener errorListener)
Creates a new request.
Protected Methods
Response<JSONArray> parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response and return an appropriate response type.
[Expand]
Inherited Methods
From class com.android.volley.toolbox.JsonRequest
From class com.android.volley.Request
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

public JsonArrayRequest (String url, Listener<JSONArray> listener, Response.ErrorListener errorListener)

Creates a new request.

Parameters
url URL to fetch the JSON from
listener Listener to receive the JSON response
errorListener Error listener, or null to ignore errors.

public JsonArrayRequest (int method, String url, JSONArray jsonRequest, Listener<JSONArray> listener, Response.ErrorListener errorListener)

Creates a new request.

Parameters
method the HTTP method to use
url URL to fetch the JSON from
jsonRequest A JSONArray to post with the request. Null is allowed and indicates no parameters will be posted along with request.
listener Listener to receive the JSON response
errorListener Error listener, or null to ignore errors.

Protected Methods

protected Response<JSONArray> parseNetworkResponse (NetworkResponse response)

Subclasses must implement this to parse the raw network response and return an appropriate response type. This method will be called from a worker thread. The response will not be delivered if you return null.

Parameters
response Response from the network
Returns
  • The parsed response, or null in the case of an error