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

  • Home
  • SEARCH
  • 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 8623855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:23:00+00:00 2026-06-12T07:23:00+00:00

I am parsing a JSON document in Python and I have gotten nearly the

  • 0

I am parsing a JSON document in Python and I have gotten nearly the whole process to work except I am having trouble converting a GPS string into the correct form.

I have the following form:

"gsx$gps":{"$t":"44°21′N 68°13′W\ufeff / \ufeff44.35°N 68.21°W\ufeff / 44.35; -68.21\ufeff (Acadia)"}

and that is from this HTML form:

44°21′N 68°13′W / 44.35°N 68.21°W / 44.35; -68.21 (Acadia)

and I want the final product to be a string that looks like this:

(44.35, -68.21)

here are a few other example JSON strings just to give you some more to work with:

"gsx$gps":{"$t":"14°15′S 170°41′W\ufeff / \ufeff14.25°S 170.68°W\ufeff / -14.25; -170.68\ufeff (American Samoa)"}

"gsx$gps":{"$t":"38°41′N 109°34′W\ufeff / \ufeff38.68°N 109.57°W\ufeff / 38.68; -109.57\ufeff (Arches)"}

I have the following:

GPSlocation = entry['gsx$gps']['$t']

and then I don’t know how to get GPSlocation into the form that I want above.

  • 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-06-12T07:23:01+00:00Added an answer on June 12, 2026 at 7:23 am

    not super elegant but it works…also you are not parsing json … just parsing a string…

    import re
    center_part = GPSLocation.split("/")[1]
    N,W = centerpart.split()
    N,W = N.split("\xb0")[0],W.split("\xb0")[0]
    tpl = (N,W)
    print tpl
    

    on a side note these are not ints …

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

Sidebar

Related Questions

I'm having trouble in parsing my JSON data in jQuery autocomplete. My JSON comes
I have a list of places in listview which i got from parsing JSON.
I'm having a problem parsing the JSON response sent from Yahoo! Placemaker. I only
I have recently started parsing JSON documents using SBJSON Parser, and I am able
I have been looking at a tutorial on parsing json response using Java. the
I am having great difficulty in successfully parsing a JSON file to use within
I'm parsing JSON that is contained in an HTML element. Consider this markup: <div
From a previous question on Stackoverflow Iterating through/Parsing JSON Object via JavaScript .... My
I already looked at a similar question here : null pointer exception-parsing json with
Possible Duplicate: JSON Parsing in Android As I find out I need to use

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.