-1

Possible Duplicate:
Sending and Parsing JSON in Android

     {
       "appstore_information":{
          "allow_jail_broken_devices":true,
          "can_edit_text":true,
          "disabled_device_features":[
             2,
             7,
             8
          ],
          "enable_document_sharing":true,
          "enable_icloud":true,
          "enable_internal_app":true,
          "enable_itunes":true,
          "enable_local_download":false,
          "enable_screen_capture":true,
          "idle_time_out":7,
          "last_modified_date":"9\/28\/2012 1:01:17 PM",
          "locations":[
             {
                "latitude":"12.824261",
                "location":"Siruseri SEZ",
                "longitude":"80.219969",
                "radius_in_miles":6
             },
             {
                "latitude":"13.02329",
                "location":"DLF",
                "longitude":"80.17509",
                "radius_in_miles":7
             }
          ],
          "offline_access_type":1,
          "profile_id":1,
          "profile_name":"Profile",
          "require_ad_authentication":true,
          "use_offline_access":false
       },
       "display_message":"Profile is available in information.",
       "

message_status":"Success."
}

Dis is my json response what is the approach to parse locations and store the individual data in an array in android?

Community
  • 1
  • 1
sindy90
  • 59
  • 1
  • 1
  • 7

4 Answers4

0

First try with This Json Parsing Example. It give you explanation how to parse your json and display response.

Hardik Joshi
  • 9,477
  • 12
  • 61
  • 113
0

Check this answer. There are thousands of topics about json parsing in internet

Community
  • 1
  • 1
Geralt_Encore
  • 3,721
  • 2
  • 31
  • 46
0

What about using json parser ( android provides one, but there are better solutions like: https://github.com/ko5tik/jsonserializer )

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35
0

There are several ways to do that. Mainly use JSONObject Class and JSONArray class from the android SDK

Yngwie89
  • 1,217
  • 9
  • 17