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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:36:43+00:00 2026-06-09T09:36:43+00:00

I am developing a user interface with Django. I have performed some operations in

  • 0

I am developing a user interface with Django. I have performed some operations in the views.py. and i have retrieved values which looks like this.

results = [{'start_time': '23:51:58', 'id_start_time': datetime.time(23, 51, 58)}, {'start_time': '23:59:04', 'id_start_time': datetime.time(23, 59, 4)}]

i am trying to save this into a json object, to be transferred back to the HTML page, where i have JQuery syntax to perform operations on these values, but for some reason its not working.
The syntax i used is,

import json

json_var = json.dumps(results)

i have also used syntax of,

variable_result = simplejson.dumps(results)

But both of them does not seem to work or i may not have understood the logic of how it works. If the syntax is correct, can u please tell me how to view those stored objects.
If the syntax is not correct, can someone please tell me how it should work with a perfect code.

  • 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-09T09:36:44+00:00Added an answer on June 9, 2026 at 9:36 am
    TypeError: datetime.time(23, 51, 58) is not JSON serializable
    

    Serialize/Stringify the datetime object first before using json.dumps or simplejson.dumps. Python’s integrated json serializer can not work with datetime “types”, just with built-in types like int, float, str, etc..

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

Sidebar

Related Questions

I have been developing an user interface with Java Swing, and I have met
I am developing a web-based user interface that plots some data from a database
in terms of performance and user interface experience , which one is better developing
Can anyone recommend some good sources of information on developing a user interface for
I am using Google Sitebricks for developing a user interface. I have a table
I am developing a rails application in which I have two models User and
I am developing a user manager which must control access to the detail view
I am developing a user control (ascx) in ASP.NET which uses javascript for manipulating
I am currently developing some user controls so that I can use them at
I'm developing an application (user space) which send notifications of value changes via network.

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.