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 7658127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:09:39+00:00 2026-05-31T13:09:39+00:00

I am running python on windows and trying to pretty print a json output.

  • 0

I am running python on windows and trying to pretty print a json output. Here is what I get:

>>> ta
{u'Status': {u'code': 200, u'request': u'geocode'}, u'Placemark': [{u'Point': {u'coordinates': [34.777821, 32.066157, 0]}, u'ExtendedData': {u'LatLonBox': {u'west': 34.71
37913, u'east': 34.8418507, u'north': 32.1039719, u'south': 32.0283265}}, u'AddressDetails': {u'Country': {u'CountryName': u'\u05d9\u05e9\u05e8\u05d0\u05dc', u'Locality':
 {u'LocalityName': u'\u05ea\u05dc \u05d0\u05d1\u05d9\u05d1 \u05d9\u05e4\u05d5'}, u'CountryNameCode': u'IL'}, u'Accuracy': 4}, u'id': u'p1', u'address': u'Tel Aviv, Israel
'}], u'name': u'Tel Aviv'}
>>> json.dumps(ta, sort_keys=True, indent = 4)
'{\n    "Placemark": [\n        {\n            "AddressDetails": {\n                "Accuracy": 4, \n                "Country": {\n                    "CountryName": "\\u
05d9\\u05e9\\u05e8\\u05d0\\u05dc", \n                    "CountryNameCode": "IL", \n                    "Locality": {\n                        "LocalityName": "\\u05ea\\u
05dc \\u05d0\\u05d1\\u05d9\\u05d1 \\u05d9\\u05e4\\u05d5"\n                    }\n                }\n            }, \n            "ExtendedData": {\n                "LatLo
nBox": {\n                    "east": 34.8418507, \n                    "north": 32.1039719, \n                    "south": 32.0283265, \n                    "west": 34.7
137913\n                }\n            }, \n            "Point": {\n                "coordinates": [\n                    34.777821, \n                    32.066157, \n
                  0\n                ]\n            }, \n            "address": "Tel Aviv, Israel", \n            "id": "p1"\n        }\n    ], \n    "Status": {\n
 "code": 200, \n        "request": "geocode"\n    }, \n    "name": "Tel Aviv"\n}'
>>>

Why doesn’t it work?

  • 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-31T13:09:40+00:00Added an answer on May 31, 2026 at 1:09 pm

    It did work. Remember that the JSON representation of a dictionary looks very much like Python syntax. Try printing out the return value from json.dumps and see if it looks more like you expect:

    s = json.dumps(ta, sort_keys=True, indent = 4)
    print s
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to SFTP from Python running on windows and installed Paramiko as
I'm running Python 3.1 on Windows and I'm trying to distribute my Pygame script
I'm running Python 2.5.4 on Windows and I keep getting an error when trying
So, I'm trying to get gtksourceview python bindings work under windows (I'm developing a
I am not really familiar Python setup, I am trying to get gheat running
I'm trying to install a Python Module by running a Windows installer (an EXE
I am running 32-bit Windows 7 and Python 2.7. I am trying to write
Hey I have a windows server running python CGI scripts and I'm having a
I want to write text files with DOS/Windows line endings '\r\n' using python running
I am running a windows machine have installed Python 2.5. I also used the

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.