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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:42:42+00:00 2026-06-07T05:42:42+00:00

I am trying to save form data, and I am wondering if I should

  • 0

I am trying to save form data, and I am wondering if I should use Python’s native pickle, or some sort of XML serializer. I wanted to use django’s serializers but these seem to be geared at working wit models, not regular Python dictionaries/objects.

The object I want to serialize would be composed almost entirely of strings (and possibly integers) and would look something like this:

data = {
  'var1': "foo",
  'var2': "bar",
  'var3': ['bar', 'foo', 'moo', 'fish'],
  'var4': 42
}

And I want to save this because I need to be able to render a HTML page based on these values at some point in the future.

Should I go ahead with saving the pickled object – or should I save it as XML? I don’t see any advantages of using XML, since I am not planning to access this outside of django. Am I making the wrong decision?

Few notes:

  • This is not something I want to save in the session or cache, because I want to keep a history of these forms indefinitely
  • The format/layout of the forms is subject to change so making a db schema to hold this information would be impractical.
  • 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-07T05:42:43+00:00Added an answer on June 7, 2026 at 5:42 am

    What about json ? It’s lightweight, readable, portable, and the serialization/deserialization is dead simple for basic types (strings, ints, dicts, lists).

    I try as hard as possible to stick to normalized db schemas, but for the few occasions where storing serialzed stuff is actually the “less worse” solution, I go for json, at least I can use my data with most programming languages.

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

Sidebar

Related Questions

I'm trying to save some data into an array but unfortunately all the data
I am trying to write a function to post form data and save returned
I'm trying to write a code to extract some form data from a HTML
I am trying to save form data to localstorage on keyup event with javascript.
I am trying to save (RavenDB build 960) the names and values of form
So I am trying to save a form with CakePHP. Its a fairly simple
I am trying to load a form and save the form details in the
I'm trying to save data with following structure: As you can see, there is
I am trying to validate a form and save it in my database. I
I am getting a JavaScript error in IE6 when trying to send form data

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.