Can anyone help me please..

4 Eylül 2017 Pazartesi 17:36:40 UTC+3 tarihinde Ömer Korkmaz yazdı:
>
> Hello friends. I am trying to pull data from json webservist with Volley 
> and Genson. But it does not give an error, but it does not pull data. The 
> problem is here. How can I access specificies data. How can I show 
> ParseData.
>
>
>
>    1. private void GetData()
>    2. 
>    
>    {
>    RequestQueue queue = Volley.newRequestQueue(this);
>    final String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     url = "https://api.github.com/users/mralexgray/repos";;
>    StringRequest postRequest = new StringRequest(Request 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+request>
>    .Method 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+method>
>    .GET, url,
>    new Response.Listener<String>()
>    {
>    
>    3. 
>    
>    @Override
>    public void onResponse(String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     response) {
>    // response
>    Log.d("Response", response);
>    ParseData(response);
>    }
>    },
>    new Response.ErrorListener()
>    {
>    
>    4. 
>    
>    @Override
>    public void onErrorResponse(VolleyError error) {
>    // error
>    Log.d("Error.Response", error.getLocalizedMessage());
>    }
>    }
>    )
>    {
>    };
>    
>    5. 
>    
>    queue.add(postRequest);
>    
>    6. 
>    
>    }
>    
>    7. 
>    
>    private void ParseData(String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     data)
>    {
>    Genson genson = new Genson();
>    try {
>    Servis[] persons = genson.deserialize(data, Servis[].class);
>    }
>    catch (Exception 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+exception>
>     e)
>    {
>    String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     hata = e.getLocalizedMessage();
>    }
>    
>    8. }
>    9. public class Servis implements Serializable 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+serializable>
>     {
>    10. public String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     id;
>    11. public String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     name;
>    12. public String 
>    
> <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string>
>     full_name;
>    13. }
>    
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6474056d-119d-46d4-bacb-bc8091535dea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to