-
What is the best way to parse the JSON response that comes from google map?
Hi All,
What is the best way to parse the JSON response that comes from google map?
JSON Response:
up vote1down votefavorite
I've written something that will get the longitude and latitude from a Google Geocode Callout.The response we get from a generic callout looks like this:
{
results=( {
address_components=( {
long_name=1600,
short_name=1600,
types=(street_number
)
},
{
long_name=Amphitheatre Parkway,
short_name=Amphitheatre Pkwy,
types=(route)
},
{
long_name=Mountain View,
short_name=Mountain View,
types=(locality,
political)
},
{
long_name=Santa Clara County,
short_name=Santa Clara 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=94043,
short_name=94043,
types=(postal_code)
} ),
formatted_address=1600 Amphitheatre Pkwy,
Mountain View,
CA 94043,
USA,
geometry= {
location= {
lat=37.4223582,
lng=-122.0844464
},
location_type=ROOFTOP,
viewport= {
northeast= {
lat=37.4237071802915,
lng=-122.0830974197085
},
southwest= {
lat=37.4210092197085,
lng=-122.0857953802915
}
}
},
place_id=ChIJ2eUgeAK6j4ARbn5u_wAGqWA,
types=(street_address)
} ),
status=OK
}Thanks
Log In to reply.
Popular Salesforce Blogs

Salesforce Consulting Services: A Salesforce Consultant's Overview of Available Services
Salesforce is the most widely used platform for customer relationship management (CRM), and it is selected by businesses that want to analyze and manage customer…

What Is Marketing Automation & How It Can Benefit Your Organization? | Salesforce
Though Marketing Automation was started aiming only for enterprises, now it’s available for everyone. Marketing Automation can be simple and complicated at the same time.…

Steps to Send a Marketing Cloud Email by using Triggered Sends in Sales Cloud
Steps to send a Marketing cloud Email by using Triggered send in sales cloud Note - First you have to enable the Triggered send in…
Popular Salesforce Videos
Write Tableau CRM Data to Salesforce Objects
Use Tableau to blend Salesforce data from across the Customer 360 platform with your other business data for increased visibility and a deeper understanding of…
Salesforce Training Video For Beginners - 2 | Sales Cloud Training |Salesforce Tutorial
This Salesforce Training Video will help you understand what is sales cloud in Salesforce, creating and converting leads in salesforce, creating accounts, products, opportunities and…
Security in Salesforce | Security Levels in Salesforce
This 'Security in Salesforce' video by Edureka will help you understand the different levels of security in Salesforce. It will also talk about some of…