你好,我正在使用volley向服务器发送请求。我正在向服务器发送一些参数&得到一个json数组& json对象作为响应。到目前为止,我正在使用JsonObjectRequest自定义请求来获取response.If,响应是JsonArray,如果响应是jsonObject,则得到json数组,然后得到json object.So,应该遵循哪种方法来获得响应?
Following is the code for sending request
public void sendData()
{
RequestQueue que=Volley.newRequestQueue
我用的是充电API。API以Json格式接收响应。我需要将输出值存储在PHP中Json响应的变量中。
// Response received from API url
$output = '{"data":[{"user":"abcd123","bal":"500","error_code":200,"resText":"Success"}]}';
//Decoding output
$json = json_decode($output,