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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:33:03+00:00 2026-05-11T03:33:03+00:00

Possible Duplicate: Converting XML to JSON using Python? I am importing an XML feed

  • 0

Possible Duplicate:
Converting XML to JSON using Python?

I am importing an XML feed and trying to convert it to JSON for output. I’m getting this error:

TypeError: <xml.dom.minidom.Document instance at 0x72787d8> is not JSON serializable

Unfortunately I know next to nothing about Python. I’m developing this on the Google App Engine. I could use some help, because my little 2 hour hack that was going so well is now on its 3rd day.

XML data:

<?xml version='1.0' ?><eveapi version='2'>   <currentTime>2009-01-25 15:03:27</currentTime>   <result>     <rowset columns='name,characterID,corporationName,corporationID' key='characterID' name='characters'>       <row characterID='999999' corporationID='999999' corporationName='filler data' name='someName'/>     </rowset>   </result>   <cachedUntil>2009-01-25 15:04:55</cachedUntil>  </eveapi> 

My code:

class doproxy(webapp.RequestHandler): def get(self):     apiurl = 'http://api.eve-online.com'      path = self.request.get('path');     type = self.request.get('type');     args = '&'+self.request.get('args');      #assemble api url     url = apiurl+path      #do GET request          if type == 'get':         result = urlfetch.fetch(url,'','get');      #do POST request     if type == 'post':         result = urlfetch.fetch(url,args,'post');         if result.status_code == 200:                        dom = minidom.parseString( result.content ) #.encode( 'utf-8' ) )         dom2json = simplejson.dump(dom,'utf-8') 
  • 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. 2026-05-11T03:33:03+00:00Added an answer on May 11, 2026 at 3:33 am

    I’m quickly coming to the opinion that Python is potentially a great language, but that none of its users know how to actually document anything in a clear and concise way.

    The attitude of the question isn’t going to help with getting answers from these same Python users.

    As is mentioned in the answers to this related question, there is no 1-to-1 correspondence between XML and JSON so the conversion can’t be done automatically.

    In the documentation for simplejson you can find the list of types that it’s able to serialize, which are basically the native Python types (dict, list, unicode, int, float, True/False, None).

    So, you have to create a Python data structure containing only these types, which you will then give to simplejson.dump().

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

Sidebar

Ask A Question

Stats

  • Questions 146k
  • Answers 146k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Sounds like almost the textbook example for decorators! def counted(fn):… May 12, 2026 at 9:05 am
  • Editorial Team
    Editorial Team added an answer After some more work on this, my findings are: In… May 12, 2026 at 9:05 am
  • Editorial Team
    Editorial Team added an answer the id of the form being submitted will be this.id… May 12, 2026 at 9:05 am

Related Questions

Possible Duplicate: Converting Raw HTTP Request into HTTPWebRequest Object I've got a custom HTTP
Possible Duplicate: Converting a string to an enumeration value in C# How do I
Possible Duplicate: Use SVN Revision to label build in CCNET I'm working through the
I'm having trouble covering all the issues with doing Software Configuration Management on a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.