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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:11:59+00:00 2026-06-05T21:11:59+00:00

Is there a way to easily extract the json data portion in the body

  • 0

Is there a way to easily extract the json data portion in the body of a POST request?
For example, if someone posts to http://www.example.com/post with the body of the form with json data, my GAE server will receive the request by calling:

jsonstr = self.request.body

However, when I look at the jsonstr, I get something like :

str: \r\n----------------------------8cf1c255b3bd7f2\r\nContent-Disposition: form-data;
name="Actigraphy"\r\n Content-Type: application/octet-
stream\r\n\r\n{"Data":"AfgCIwHGAkAB4wFYAZkBKgHwAebQBaAD.....

I just want to be able to call a function to extract the json part of the body which starts at the {“Data”:…… section.

Is there an easy function I can call to do this?

  • 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-05T21:12:00+00:00Added an answer on June 5, 2026 at 9:12 pm

    there is a misunderstanding, the string you show us is not json data, it looks like a POST body. You have to parse the body with something like cgi.parse_multipart.
    Then you could parse json like answered by aschmid00. But instead of the body, you parse only the data.

    Here you can find a working code that shows how to use cgi.FieldStorage for parsing the POST body.
    This Question is also answered here..

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

Sidebar

Related Questions

Is there any way to easily make a HTTP request with C++? Specifically, I
Is there a way to easily specify whether to convert an object as JSON
Is there any way of easily deciphering (i.e. at a glance) whether or not
I am wondering if there is a way that you can easily and safely
Is there any way to easily fix this issue or do I really need
Is there a way to easily create Java Input/Output streams for unnamed pipes created
Is there a way to easily find an iterator where an element would be
Is there a way to easily create a text header in VI? I would
I am using openssl to get data about x509 certificate. Is there a way
Is there a way to easily sort in SQL Server 2005 while ignoring hyphens

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.