php - parsing a specific JSON data -


I am creating an Android application, one. For a Java script file call using php file which gives me a JSON output, my problem now is that the output is in a valid JSON format, but I am confused as a way to parse the values. Output is

  {"destination_addresses": ["Kamberanvi road, Durgakkari, Karnataka 580011, India", "St. Inez Road, Santa Inez, Panjim, Goa 403001, India", "Dr. Brugenza India "," [["India", "Santa Inez, Panzim, Goa 403001, India", " "Duration": {"Suffocation": "Suyog residency, St. Joakim road, Bordo, Madgao, Goa 403602, India" Distance ": {" text ":" 133 km "," value ": 132717} "Text": "1 "Value": {"text": "33.4 km", "value": 33427}, "duration": {"text": "value": "value": "value": "value": "value": {"text" : "Duration": {"Text": "33.5 km", "Price": 33518}, "Duration": "Price": 24832}, "Status": "Value"}, {"Distance": "6 hours 54 minutes" {"Text": "6 hours 55 minutes", "value": 24 9 23}, "position": "right"}, {"distance": {"text": "33.8 km", "value": 33834 {"Text": {"text": "7 hours 0 minutes", "value": 25170}, "status": "right"}, {"distance": {"text": "33.5 km", " "Value": 33503}, "period": {"text": "6 hours 55 minutes", "value": 24893}, "status": "right"}, {"distance" : {"Text": "33.57", "value": 33457}, "duration": {"text": "6 hours 55 minutes", "value": 24880}, "condition": "right"}]} I want to parse the values ​​in such a way that I put the distance of the result in a data structure like an array, and then put them in the I can sort / P> 

Thanks in advance.

Use this to make your model.

After creating the model, you can use the bwlow code.

  GSON gsn = new gsn (); GSN From Jason (jadata, adapostodel. Class);   

AddPostModel has all the data that comes from the server.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -