Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:16:16+00:00 2026-05-17T01:16:16+00:00

I get the Json from google. it has many details on many things but

  • 0

I get the Json from google. it has many details on many things but I just want the longitude and latitude. I have been successfully deserialized json using:

        JavaScriptSerializer jSerialize = new JavaScriptSerializer();
        //var businessObject = jSerialize.Deserialize<string>(configuration);
        Hashtable businessObject = jSerialize.Deserialize<Hashtable>(configuration);

        var o = businessObject["results"];

So, my o object has all that stuff, anyway, I just need the longitude and latitude.. what is the best way to do it?

I cant seem to get the right definition to cast o into strictly typed class (error: cant cast to type)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:16:17+00:00Added an answer on May 17, 2026 at 1:16 am

    Skip the Hashtable and deserialize into an instance of your type:

    public class Coordinate
    {
        public double Longitude { get; set; }
    
        public double Latitude { get; set; }
    }
    
    ...
    
    JavaScriptSerializer jSerialize = new JavaScriptSerializer();
    var coordinate = jSerialize.Deserialize<Coordinate>(configuration);
    

    I am unfamiliar with the JSON response, so you may need to modify your object model accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any one has done this, i want to get data parse from the JSON
I've been trying to get a json response from google's geocoding service. I'm using
I am getting json response from this google api service to get reverse geo
I get json string from server. Then I parser it using SBJSON library. But
I have a website where an ajax call will get some Json data from
I need to get value from json. It works perfectly on returned objects, but
I am using the Google Api PHP Client. I want to get the details
My custom method to get json from string: function GetJSON(a) { if (typeof a
In my project ,I get json data from Server,there's a field named 'creat_at' in
I'm trying to get a JSON from a webservice with javascript $.Ajax call. <script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.