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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:45:04+00:00 2026-05-18T04:45:04+00:00

I have a python FastCGI server which accepts POST from client, I want to

  • 0

I have a python FastCGI server which accepts POST from client, I want to use JSON as the format to communicate between the client and server, but it really confuse me how it works.

The JSON representation in javascript is:

{'login_user': {'username':username, 'password':password}}

When I post this JSON object, the jquery will re-encode it to dict and convert it to string, encode it and send it out:

login_user[username] = "kajjd"&loginuser[password] = "kdjfdj" #it's unescaped query string

My python server will receive this string. I also want to use JSON in the server side, what I can do to convert this query string back to JSON in python? Is it any fast way?

I don’t know my usage of JSON is good way, but I can’t see any good side of JSON, why not XML? I am asking myself.

  • 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-18T04:45:05+00:00Added an answer on May 18, 2026 at 4:45 am

    XML for communication for a web-app? Take a deep breath and think about it. If you have doubts about it, then it means you really have no need for it. You rely on XML for fairly complex data sets with potential heavy modifications to the format of a protocol to be foreseen over time. By nature XML would make this OK: morphing the data, producing different versions, allowing for self-describing formats to be parsed by code who wouldn’t need to detect this itself and know what to do about it. Otherwise prefer something more lightweight (and that could still achieve pretty much the same thing). That’s why JSON is a good alternative: it’s still more compact, and relatively easy to manipulate both by a human and a machine. If you were to need to reduce bandwidth a lot, then look at binary formats.

    Now moving on to the real question: See this answer for JSON usage in JavaScript and Java. They’re all bi-directional libraries supporting decoding and encoding.

    Now regarding your form: if you want to use JSON, why do you transform the string this dict format?

    To get data from the server, either do a normal AJAX request and parse or eval your returned value (parsing preferred, if possible with native APIs), or use something like jQuery.getJSON. Or jquery-json.

    To send the request to the server, lookup jQuery.ajax() or jQuery.post().

    You may also want to look at these questions:

    • Formalize Form to JSON with jQuery
    • Serializing to JSON in jQuery
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XMPP server (likely — python, twisted, wokkel), which I prefer not
I have Python 2.6 and I want to install easy _ install module. The
I have a Python application in a strange state. I don't want to do
I have a python module that makes use of a huge dictionary global variable,
I have Django set up on my server at http://stevencampbell.org/ I want to be
I have an IIS 6.0 web server that I currently use to serve some
I have Python 2.6.4 installed in C:\Python26. I have PyQt4 installed from here: http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-Py2.6-gpl-4.7.7-1.exe
If I have Python code class A(): pass class B(): pass class C(A, B):
Is it possible to have Python save the .pyc files to a separate folder
If I wanted to have Python distributed across multiple processors on multiple computers, what

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.