Aniket Narvankar

Aniket Narvankar

  • 562
  • 2.1k
  • 604.4k

Asp.Net,Jquery,C Sharp

Jun 17 2022 6:08 AM

I am hitting a api from asp.net c sharp code. From api i am getting this response

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "564",
               "short_name" : "564",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "Shadow Lane",
               "short_name" : "Shadow Ln",
               "types" : [ "route" ]
            },
            {
               "long_name" : "Simi Valley",
               "short_name" : "Simi Valley",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Ventura County",
               "short_name" : "Ventura County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "California",
               "short_name" : "CA",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "93065",
               "short_name" : "93065",
               "types" : [ "postal_code" ]
            },
            {
               "long_name" : "7380",
               "short_name" : "7380",
               "types" : [ "postal_code_suffix" ]
            }
         ],
         "formatted_address" : "564 Shadow Ln, Simi Valley, CA 93065, USA",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 34.2302076,
                  "lng" : -118.8016784
               },
               "southwest" : {
                  "lat" : 34.2300908,
                  "lng" : -118.8019011
               }
            },
            "location" : {
               "lat" : 34.2301467,
               "lng" : -118.8017991
            },
            "location_type" : "ROOFTOP",
            "viewport" : {
               "northeast" : {
                  "lat" : 34.2314981802915,
                  "lng" : -118.8004744197085
               },
               "southwest" : {
                  "lat" : 34.2288002197085,
                  "lng" : -118.8031723802915
               }
            }
         },
         "place_id" : "ChIJy16ydnIv6IARCgIUVmhNO3Y",
         "types" : [ "premise" ]
      }
   ],
   "status" : "OK"
}

Kindly let me now,how to store this object in c sharp class. What should be my class properties. please help me out on the same


Answers (5)