mari muthu

mari muthu

  • 1.7k
  • 198
  • 56.3k

google map Deserialize the string Value

Apr 17 2018 2:10 AM
hi i need to deserialize the string from the responce data which i have showned below
 
here i need to get the Address Component 3rd index long Name and formatted adress value  
 
  1. {  
  2.    "results" : [  
  3.       {  
  4.          "address_components" : [  
  5.             {  
  6.                "long_name" : "L-6",  
  7.                "short_name" : "L-6",  
  8.                "types" : [ "street_number" ]  
  9.             },  
  10.             {  
  11.                "long_name" : "3rd Cross Road",  
  12.                "short_name" : "3rd Cross Rd",  
  13.                "types" : [ "route" ]  
  14.             },  
  15.             {  
  16.                "long_name" : "Guindy Industrial Estate",  
  17.                "short_name" : "Guindy Industrial Estate",  
  18.                "types" : [ "political""sublocality""sublocality_level_3" ]  
  19.             },  
  20.             {  
  21.                "long_name" : "SIDCO Industrial Estate",  
  22.                "short_name" : "SIDCO Industrial Estate",  
  23.                "types" : [ "political""sublocality""sublocality_level_2" ]  
  24.             },  
  25.             {  
  26.                "long_name" : "Guindy",  
  27.                "short_name" : "Guindy",  
  28.                "types" : [ "political""sublocality""sublocality_level_1" ]  
  29.             },  
  30.             {  
  31.                "long_name" : "Chennai",  
  32.                "short_name" : "Chennai",  
  33.                "types" : [ "locality""political" ]  
  34.             },  
  35.             {  
  36.                "long_name" : "Chennai",  
  37.                "short_name" : "Chennai",  
  38.                "types" : [ "administrative_area_level_2""political" ]  
  39.             },  
  40.             {  
  41.                "long_name" : "Tamil Nadu",  
  42.                "short_name" : "TN",  
  43.                "types" : [ "administrative_area_level_1""political" ]  
  44.             },  
  45.             {  
  46.                "long_name" : "India",  
  47.                "short_name" : "IN",  
  48.                "types" : [ "country""political" ]  
  49.             },  
  50.             {  
  51.                "long_name" : "600032",  
  52.                "short_name" : "600032",  
  53.                "types" : [ "postal_code" ]  
  54.             }  
  55.          ],  
  56.          "formatted_address" : "L-6, 3rd Cross Rd, Guindy Industrial Estate, SIDCO Industrial Estate, Guindy, Chennai, Tamil Nadu 600032, India",  
  57.          "geometry" : {  
  58.             "location" : {  
  59.                "lat" : 13.011156,  
  60.                "lng" : 80.208122  
  61.             },  
  62.             "location_type" : "ROOFTOP",  
  63.             "viewport" : {  
  64.                "northeast" : {  
  65.                   "lat" : 13.0125049802915,  
  66.                   "lng" : 80.20947098029151  
  67.                },  
  68.                "southwest" : {  
  69.                   "lat" : 13.0098070197085,  
  70.                   "lng" : 80.20677301970849  
  71.                }  
  72.             }  
  73.          },  
  74.          "place_id" : "ChIJld8ZdEBnUjoRv2vkDD_qGuE",  
  75.          "types" : [ "street_address" ]  
  76.       },  
  77.       {  
  78.          "address_components" : [  
  79.             {  
  80.                "long_name" : "Guindy Industrial Estate",  
  81.                "short_name" : "Guindy Industrial Estate",  
  82.                "types" : [ "political""sublocality""sublocality_level_3" ]  
  83.             },  
  84.             {  
  85.                "long_name" : "SIDCO Industrial Estate",  
  86.                "short_name" : "SIDCO Industrial Estate",  
  87.                "types" : [ "political""sublocality""sublocality_level_2" ]  
  88.             },  
  89.             {  
  90.                "long_name" : "Guindy",  
  91.                "short_name" : "Guindy",  
  92.                "types" : [ "political""sublocality""sublocality_level_1" ]  
  93.             },  
  94.             {  
  95.                "long_name" : "Chennai",  
  96.                "short_name" : "Chennai",  
  97.                "types" : [ "locality""political" ]  
  98.             },  
  99.             {  
  100.                "long_name" : "Chennai",  
  101.                "short_name" : "Chennai",  
  102.                "types" : [ "administrative_area_level_2""political" ]  
  103.             },  
  104.             {  
  105.                "long_name" : "Tamil Nadu",  
  106.                "short_name" : "TN",  
  107.                "types" : [ "administrative_area_level_1""political" ]  
  108.             },  
  109.             {  
  110.                "long_name" : "India",  
  111.                "short_name" : "IN",  
  112.                "types" : [ "country""political" ]  
  113.             },  
  114.             {  
  115.                "long_name" : "600032",  
  116.                "short_name" : "600032",  
  117.                "types" : [ "postal_code" ]  
  118.             }  
  119.          ],  
  120.          "formatted_address" : "Guindy Industrial Estate, SIDCO Industrial Estate, Guindy, Chennai, Tamil Nadu 600032, India",  
  121.          "geometry" : {  
  122.             "bounds" : {  
  123.                "northeast" : {  
  124.                   "lat" : 13.0140719,  
  125.                   "lng" : 80.21289609999999  
  126.                },  
  127.                "southwest" : {  
  128.                   "lat" : 13.00762,  
  129.                   "lng" : 80.20229499999999  
  130.                }  
  131.             },  
  132.             "location" : {  
  133.                "lat" : 13.0100275,  
  134.                "lng" : 80.2084273  
  135.             },  
  136.             "location_type" : "APPROXIMATE",  
  137.             "viewport" : {  
  138.                "northeast" : {  
  139.                   "lat" : 13.0140719,  
  140.                   "lng" : 80.21289609999999  
  141.                },  
  142.                "southwest" : {  
  143.                   "lat" : 13.00762,  
  144.                   "lng" : 80.20229499999999  
  145.                }  
  146.             }  
  147.          },  
  148.          "place_id" : "ChIJ6dkybUBnUjoR9o7onXazXmE",  
  149.          "types" : [ "political""sublocality""sublocality_level_3" ]  
  150.       },  
  151.       {  
  152.          "address_components" : [  
  153.             {  
  154.                "long_name" : "SIDCO Industrial Estate",  
  155.                "short_name" : "SIDCO Industrial Estate",  
  156.                "types" : [ "political""sublocality""sublocality_level_2" ]  
  157.             },  
  158.             {  
  159.                "long_name" : "Guindy",  
  160.                "short_name" : "Guindy",  
  161.                "types" : [ "political""sublocality""sublocality_level_1" ]  
  162.             },  
  163.             {  
  164.                "long_name" : "Chennai",  
  165.                "short_name" : "Chennai",  
  166.                "types" : [ "locality""political" ]  
  167.             },  
  168.             {  
  169.                "long_name" : "Chennai",  
  170.                "short_name" : "Chennai",  
  171.                "types" : [ "administrative_area_level_2""political" ]  
  172.             },  
  173.             {  
  174.                "long_name" : "Tamil Nadu",  
  175.                "short_name" : "TN",  
  176.                "types" : [ "administrative_area_level_1""political" ]  
  177.             },  
  178.             {  
  179.                "long_name" : "India",  
  180.                "short_name" : "IN",  
  181.                "types" : [ "country""political" ]  
  182.             }  
  183.          ],  
  184.          "formatted_address" : "SIDCO Industrial Estate, Guindy, Chennai, Tamil Nadu, India",  
  185.          "geometry" : {  
  186.             "bounds" : {  
  187.                "northeast" : {  
  188.                   "lat" : 13.021967,  
  189.                   "lng" : 80.220556  
  190.                },  
  191.                "southwest" : {  
  192.                   "lat" : 13.00762,  
  193.                   "lng" : 80.19865799999999  
  194.                }  
  195.             },  
  196.             "location" : {  
  197.                "lat" : 13.0144557,  
  198.                "lng" : 80.2126109  
  199.             },  
  200.             "location_type" : "APPROXIMATE",  
  201.             "viewport" : {  
  202.                "northeast" : {  
  203.                   "lat" : 13.021967,  
  204.                   "lng" : 80.220556  
  205.                },  
  206.                "southwest" : {  
  207.                   "lat" : 13.00762,  
  208.                   "lng" : 80.19865799999999  
  209.                }  
  210.             }  
  211.          },  
  212.          "place_id" : "ChIJlaIMZBVnUjoRRy-aqVRfCrQ",  
  213.          "types" : [ "political""sublocality""sublocality_level_2" ]  
  214.       },  
  215.       {  
  216.          "address_components" : [  
  217.             {  
  218.                "long_name" : "Guindy",  
  219.                "short_name" : "Guindy",  
  220.                "types" : [ "political""sublocality""sublocality_level_1" ]  
  221.             },  
  222.             {  
  223.                "long_name" : "Chennai",  
  224.                "short_name" : "Chennai",  
  225.                "types" : [ "locality""political" ]  
  226.             },  
  227.             {  
  228.                "long_name" : "Chennai",  
  229.                "short_name" : "Chennai",  
  230.                "types" : [ "administrative_area_level_2""political" ]  
  231.             },  
  232.             {  
  233.                "long_name" : "Tamil Nadu",  
  234.                "short_name" : "TN",  
  235.                "types" : [ "administrative_area_level_1""political" ]  
  236.             },  
  237.             {  
  238.                "long_name" : "India",  
  239.                "short_name" : "IN",  
  240.                "types" : [ "country""political" ]  
  241.             }  
  242.          ],  
  243.          "formatted_address" : "Guindy, Chennai, Tamil Nadu, India",  
  244.          "geometry" : {  
  245.             "bounds" : {  
  246.                "northeast" : {  
  247.                   "lat" : 13.021967,  
  248.                   "lng" : 80.2408241  
  249.                },  
  250.                "southwest" : {  
  251.                   "lat" : 12.9914489,  
  252.                   "lng" : 80.19865799999999  
  253.                }  
  254.             },  
  255.             "location" : {  
  256.                "lat" : 13.0102357,  
  257.                "lng" : 80.21565100000001  
  258.             },  
  259.             "location_type" : "APPROXIMATE",  
  260.             "viewport" : {  
  261.                "northeast" : {  
  262.                   "lat" : 13.021967,  
  263.                   "lng" : 80.2408241  
  264.                },  
  265.                "southwest" : {  
  266.                   "lat" : 12.9914489,  
  267.                   "lng" : 80.19865799999999  
  268.                }  
  269.             }  
  270.          },  
  271.          "place_id" : "ChIJfQqkmnBnUjoRUCdR_JWGNMo",  
  272.          "types" : [ "political""sublocality""sublocality_level_1" ]  
  273.       },  
  274.       {  
  275.          "address_components" : [  
  276.             {  
  277.                "long_name" : "Chennai",  
  278.                "short_name" : "Chennai",  
  279.                "types" : [ "locality""political" ]  
  280.             },  
  281.             {  
  282.                "long_name" : "Chennai",  
  283.                "short_name" : "Chennai",  
  284.                "types" : [ "administrative_area_level_2""political" ]  
  285.             },  
  286.             {  
  287.                "long_name" : "Tamil Nadu",  
  288.                "short_name" : "TN",  
  289.                "types" : [ "administrative_area_level_1""political" ]  
  290.             },  
  291.             {  
  292.                "long_name" : "India",  
  293.                "short_name" : "IN",  
  294.                "types" : [ "country""political" ]  
  295.             }  
  296.          ],  
  297.          "formatted_address" : "Chennai, Tamil Nadu, India",  
  298.          "geometry" : {  
  299.             "bounds" : {  
  300.                "northeast" : {  
  301.                   "lat" : 13.2611661,  
  302.                   "lng" : 80.33632279999999  
  303.                },  
  304.                "southwest" : {  
  305.                   "lat" : 12.8338848,  
  306.                   "lng" : 80.0817007  
  307.                }  
  308.             },  
  309.             "location" : {  
  310.                "lat" : 13.0826802,  
  311.                "lng" : 80.27071840000001  
  312.             },  
  313.             "location_type" : "APPROXIMATE",  
  314.             "viewport" : {  
  315.                "northeast" : {  
  316.                   "lat" : 13.2611661,  
  317.                   "lng" : 80.33632279999999  
  318.                },  
  319.                "southwest" : {  
  320.                   "lat" : 12.8338848,  
  321.                   "lng" : 80.0817007  
  322.                }  
  323.             }  
  324.          },  
  325.          "place_id" : "ChIJYTN9T-plUjoRM9RjaAunYW4",  
  326.          "types" : [ "locality""political" ]  
  327.       },  
  328.       {  
  329.          "address_components" : [  
  330.             {  
  331.                "long_name" : "600032",  
  332.                "short_name" : "600032",  
  333.                "types" : [ "postal_code" ]  
  334.             },  
  335.             {  
  336.                "long_name" : "Chennai",  
  337.                "short_name" : "Chennai",  
  338.                "types" : [ "locality""political" ]  
  339.             },  
  340.             {  
  341.                "long_name" : "Tamil Nadu",  
  342.                "short_name" : "TN",  
  343.                "types" : [ "administrative_area_level_1""political" ]  
  344.             },  
  345.             {  
  346.                "long_name" : "India",  
  347.                "short_name" : "IN",  
  348.                "types" : [ "country""political" ]  
  349.             }  
  350.          ],  
  351.          "formatted_address" : "Chennai, Tamil Nadu 600032, India",  
  352.          "geometry" : {  
  353.             "bounds" : {  
  354.                "northeast" : {  
  355.                   "lat" : 13.0283756,  
  356.                   "lng" : 80.2250358  
  357.                },  
  358.                "southwest" : {  
  359.                   "lat" : 12.9969577,  
  360.                   "lng" : 80.1933729  
  361.                }  
  362.             },  
  363.             "location" : {  
  364.                "lat" : 13.0177153,  
  365.                "lng" : 80.2056743  
  366.             },  
  367.             "location_type" : "APPROXIMATE",  
  368.             "viewport" : {  
  369.                "northeast" : {  
  370.                   "lat" : 13.0283756,  
  371.                   "lng" : 80.2250358  
  372.                },  
  373.                "southwest" : {  
  374.                   "lat" : 12.9969577,  
  375.                   "lng" : 80.1933729  
  376.                }  
  377.             }  
  378.          },  
  379.          "place_id" : "ChIJhe7-5z9nUjoRUYyAIGuNq9Y",  
  380.          "types" : [ "postal_code" ]  
  381.       },  
  382.       {  
  383.          "address_components" : [  
  384.             {  
  385.                "long_name" : "Chennai",  
  386.                "short_name" : "Chennai",  
  387.                "types" : [ "administrative_area_level_2""political" ]  
  388.             },  
  389.             {  
  390.                "long_name" : "Tamil Nadu",  
  391.                "short_name" : "TN",  
  392.                "types" : [ "administrative_area_level_1""political" ]  
  393.             },  
  394.             {  
  395.                "long_name" : "India",  
  396.                "short_name" : "IN",  
  397.                "types" : [ "country""political" ]  
  398.             }  
  399.          ],  
  400.          "formatted_address" : "Chennai, Tamil Nadu, India",  
  401.          "geometry" : {  
  402.             "bounds" : {  
  403.                "northeast" : {  
  404.                   "lat" : 13.1445431,  
  405.                   "lng" : 80.310333  
  406.                },  
  407.                "southwest" : {  
  408.                   "lat" : 12.933583,  
  409.                   "lng" : 80.18449409999999  
  410.                }  
  411.             },  
  412.             "location" : {  
  413.                "lat" : 13.0587471,  
  414.                "lng" : 80.254435  
  415.             },  
  416.             "location_type" : "APPROXIMATE",  
  417.             "viewport" : {  
  418.                "northeast" : {  
  419.                   "lat" : 13.1445431,  
  420.                   "lng" : 80.310333  
  421.                },  
  422.                "southwest" : {  
  423.                   "lat" : 12.933583,  
  424.                   "lng" : 80.18449409999999  
  425.                }  
  426.             }  
  427.          },  
  428.          "place_id" : "ChIJ7015dmlmUjoRAqlpl1kIAxs",  
  429.          "types" : [ "administrative_area_level_2""political" ]  
  430.       },  
  431.       {  
  432.          "address_components" : [  
  433.             {  
  434.                "long_name" : "Chennai Metropolitan Area",  
  435.                "short_name" : "Chennai Metropolitan Area",  
  436.                "types" : [ "political" ]  
  437.             },  
  438.             {  
  439.                "long_name" : "Tamil Nadu",  
  440.                "short_name" : "TN",  
  441.                "types" : [ "administrative_area_level_1""political" ]  
  442.             },  
  443.             {  
  444.                "long_name" : "India",  
  445.                "short_name" : "IN",  
  446.                "types" : [ "country""political" ]  
  447.             }  
  448.          ],  
  449.          "formatted_address" : "Chennai Metropolitan Area, Tamil Nadu",  
  450.          "geometry" : {  
  451.             "bounds" : {  
  452.                "northeast" : {  
  453.                   "lat" : 13.29631,  
  454.                   "lng" : 80.3533479  
  455.                },  
  456.                "southwest" : {  
  457.                   "lat" : 12.8338848,  
  458.                   "lng" : 80.01402849999999  
  459.                }  
  460.             },  
  461.             "location" : {  
  462.                "lat" : 13.1262694,  
  463.                "lng" : 80.23213129999999  
  464.             },  
  465.             "location_type" : "APPROXIMATE",  
  466.             "viewport" : {  
  467.                "northeast" : {  
  468.                   "lat" : 13.29631,  
  469.                   "lng" : 80.3533479  
  470.                },  
  471.                "southwest" : {  
  472.                   "lat" : 12.8338848,  
  473.                   "lng" : 80.01402849999999  
  474.                }  
  475.             }  
  476.          },  
  477.          "place_id" : "ChIJp07pkMJmUjoRppFFd1PO5Dc",  
  478.          "types" : [ "political" ]  
  479.       },  
  480.       {  
  481.          "address_components" : [  
  482.             {  
  483.                "long_name" : "Tamil Nadu",  
  484.                "short_name" : "TN",  
  485.                "types" : [ "administrative_area_level_1""political" ]  
  486.             },  
  487.             {  
  488.                "long_name" : "India",  
  489.                "short_name" : "IN",  
  490.                "types" : [ "country""political" ]  
  491.             }  
  492.          ],  
  493.          "formatted_address" : "Tamil Nadu, India",  
  494.          "geometry" : {  
  495.             "bounds" : {  
  496.                "northeast" : {  
  497.                   "lat" : 13.496666,  
  498.                   "lng" : 80.3464511  
  499.                },  
  500.                "southwest" : {  
  501.                   "lat" : 8.0690069,  
  502.                   "lng" : 76.23055409999999  
  503.                }  
  504.             },  
  505.             "location" : {  
  506.                "lat" : 11.1271225,  
  507.                "lng" : 78.6568942  
  508.             },  
  509.             "location_type" : "APPROXIMATE",  
  510.             "viewport" : {  
  511.                "northeast" : {  
  512.                   "lat" : 13.496666,  
  513.                   "lng" : 80.3464511  
  514.                },  
  515.                "southwest" : {  
  516.                   "lat" : 8.0690069,  
  517.                   "lng" : 76.23055409999999  
  518.                }  
  519.             }  
  520.          },  
  521.          "place_id" : "ChIJM5YYsYLFADsR8GEzRsx1lFU",  
  522.          "types" : [ "administrative_area_level_1""political" ]  
  523.       },  
  524.       {  
  525.          "address_components" : [  
  526.             {  
  527.                "long_name" : "India",  
  528.                "short_name" : "IN",  
  529.                "types" : [ "country""political" ]  
  530.             }  
  531.          ],  
  532.          "formatted_address" : "India",  
  533.          "geometry" : {  
  534.             "bounds" : {  
  535.                "northeast" : {  
  536.                   "lat" : 35.5087008,  
  537.                   "lng" : 97.39535869999999  
  538.                },  
  539.                "southwest" : {  
  540.                   "lat" : 6.4626999,  
  541.                   "lng" : 68.1097  
  542.                }  
  543.             },  
  544.             "location" : {  
  545.                "lat" : 20.593684,  
  546.                "lng" : 78.96288  
  547.             },  
  548.             "location_type" : "APPROXIMATE",  
  549.             "viewport" : {  
  550.                "northeast" : {  
  551.                   "lat" : 35.5087008,  
  552.                   "lng" : 97.39535869999999  
  553.                },  
  554.                "southwest" : {  
  555.                   "lat" : 6.4626999,  
  556.                   "lng" : 68.1097  
  557.                }  
  558.             }  
  559.          },  
  560.          "place_id" : "ChIJkbeSa_BfYzARphNChaFPjNc",  
  561.          "types" : [ "country""political" ]  
  562.       }  
  563.    ],  
  564.    "status" : "OK"  
  565. }  
 

Answers (1)